Skip to content

24 ways to impress your friends

Vote down?

Angela Relle

I think you could neaten that shell script up a bit (and make it easier to read) using head and tail:

FIRST=

for FILE in file*.csv do if [ -z “$FIRST” ] then head -n 1 “$FILE” FIRST=“no” fi tail -n +2 $FILE

done > file.out