the following lines append the content of essay_i.txt to the end of essay1.txt;
touch essay1.txt
for (( i = 1 ; i <= 10 ; i++ )); do
sed '2p' essay_"${i}".txt >> essay1.txt
done
how should i change it so that the first line of each of essay_i.txt are not copied (i.e. only copy line 2->end) ?
awk 'FNR>1' essay_[0-9].txt essay_[1-9][0-9].txt > essay1.txt. Would be even shorter if the numbers in the filenames were zero-padded. – geirha Feb 7 '11 at 20:55