24 ways to impress your friends

Jump to menu

Vote up?

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