7

This question already has an answer here:

The following script works to cat all files in a directory without header but prints the file name. How can I cat without file name.

tail -n +2 * >> Compile

marked as duplicate by don_crissti, Kusalananda, sam, mdpc, heemayl Jan 6 '17 at 6:59

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

9

Alternative method:

for f in *; do tail -n +2 "$f" >> Compile; done
3

sed can be used to miss out lines:

sed -s 1d * >> Compile

this is assuming the folder only contains test files though; I just checked here and it didn't like directories at all, while tail coped.

You could use find then though if needed:

find . -maxdepth 1 -type f * | xargs sed -s 1d >> Compile

Added the -s Flag for separate. This deals with each file separately but is GNU only from the looks of things, unfortunately

  • Ah... one minute! – Guy Jan 5 '17 at 22:00
  • Oh dear.. I may get there eventually.. cheers for the corrections! – Guy Jan 5 '17 at 22:09

Not the answer you're looking for? Browse other questions tagged or ask your own question.