Post date: Mar 21, 2015 12:02:55 AM
I want to merge csv files into one single file by preserving the header of the first one.
> cat file1.csvId,city,name ,location1,NA,JACK,CA> cat file2.csvID,city,name,location2,NY,JERRY,NY> cat file3.csvID,city,name,location3,WA,BERNY,WA> awk 'FNR==1 && NR!=1{next;}{print}' file*.csv > file123.csv> cat file123.csvId,city,name ,location1,NA,JACK,CA2,NY,JERRY,NY3,WA,BERNY,WAcredits: http://stackoverflow.com/questions/16890582/unixmerge-multiple-csv-files-with-same-header-by-keeping-the-header-of-the-firs