I have two csv files.
Columns of the first file
col1, col2, col3,......col4095, col4096, col4097
Columns of the second file
col1, col2, col3,......,col4095, col4096, col4097
Expected output - the last column of the first file is discarded
col1, col2, col3.......,col4095. col4096, col1, col2, col3....col4095, col4096, col4097
Both files have the same number of rows, I want to merge the two files into one file.
Use paste :
paste -d, f1.csv f2.csv > out.csv
To ignore last column of first file:
awk -F, 'NF-=1' OFS=, f1.csv | paste -d, - f2.csv > out.csv
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With