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
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
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
-q
flag:tail -q -n+2 *
– Dima Lituiev Feb 21 '22 at 02:39