Heads or Tails?
There is a command, head, to take the first piece of a file.
There is a command, tail, to take the last piece of a file.
Tail does a few extra things, because it's useful to watch the end of a file that is being updated and similar things, but they should be pretty similar pieces of code, supporting similar options, right?
Well, no.
head supports a negative number of lines as argument, meaning "all but the last N lines", and tail doesn't.
Same about bytes instead of lines
That means that you can't quite simply get "all but the first two lines of this file".
But don't worry, this is how you do it:
tac file |head --lines=-2 | tac
Correction: tail has what I wanted. I am just a silly guy that doesn't read the man pages completely, you can do tail -n +2
to do it.
On the other hand, it's not explained in the option, and the syntax is different from head's, so it's still slightly rant-worthy ;-)