Last Updated: February 25, 2016
·
1.352K
· cmdel

Concatenate all files in a directory except for their individual first lines

The following script will concatenate the contents of all csv files in the present directory without the first line. This is really useful when you want to merge files into one file without their headers.

for i in $(ls *csv); do 
    tail -n+2 $i >> output.csv;
done