I have CSV files which are in a form of:1.csv1,2,3,4,5,6,7,82.csv2,4,5,7,8,8,9,53.csv2,3,4,5,6,7,8,9.....up to 18.csv.I want the result in result.csv to be:1,2,3,4,5,6,7,8,2,4,5,7,8,8,9,5,2,3,4,5,6,7,8,9I tried cat but it appends one another after only. I also want to transpose the CSV such that 1.csv is converted to: 12345678
How to combine CSV files
linux;text processing;awk;sed;csv
I got the result.csv file with:for i in {1..18}; do paste $i.csv; done | paste -s > result.csvOr with cat:for i in {1..18}; do cat $i.csv; done | paste -s > result.csv(Put all together with paste/cat and then format the output with -s in order to have it in one line.)Avoiding the loop:cat {1..18}.csv | paste -s > result.csvTo transpose 1.csv:sed 's/,/\n/g' 1.csv(Just convert commas by carriage return)