I have multiple CSV files from these I want to extract 3rd column and write it new file, in the same manner, the file is sequenced in a folder. Append should be in such a manner that all the columns come side by side and not one below another. I used multiple commands
paste -d "," *csv >> Main.csv
Resulted in improper sequences of the data appending. Files sequencing was wrong. (wasn't able to understand how to append-only specific columns, entire file was appended but were side by side)
cut -d ',' -f1-2 *.csv t.csv
Resulted in appending data one below another instead of side by side. (and appended two columns which I can change to append one column).
cut -d ',' -f1-2 File1.csv | paste File2.csv - > Main.csv
This method worked for 2 files but again how to extend it to reading multiple files.
Eg:-
File_1.csv
a,32,37
b,26,34
c,56,65
File_2.csv
a,92,60
b,48,63
c,52,23
File_3.csv
a,2,37
b,45,53
c,56,63
.
.
.
.
Output_File.csv
a,37,60,37 . . . .
b,34,63,53 . . . .
c,65,23,63 . . . .
paste <(cut -d',' -f2 *csv)?cutwith,as delimiter?