Given a text file of unknown length, how can I read, for example all but the first 2 lines of the file? I know tail
will give me the last N lines, but I don't know what N is ahead of time.
So for a file
AAAA
BBBB
CCCC
DDDD
EEEE
I want
CCCC
DDDD
EEEE
And for a file
AAAA
BBBB
CCCC
I'd get just
CCCC
tail --help
gives the following:
-n, --lines=K output the last K lines, instead of the last 10;
or use -n +K to output lines starting with the Kth
So to filter out the first 2
lines, -n +3
should give you the output you are looking for (start from 3rd).