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
tail
tail -n +linecount filename will start output at line linecount of filename, so tail -n +3 filename should do what you want.
tail -n +linecount filename
linecount
filename
tail -n +3 filename
A simple solution using awk:
awk 'NR > 2 { print }' file.name