I would like to simulate GNU\'s head -n -3, which prints all lines except the last 3, because head on FreeBSD doesn\'t have this feature. So I am t
head -n -3
head
Pure bash and simple tools (wc and cut):
head -n $(($(wc -l file | cut -c-8)-3)) file
Disclaimer - I don't have access to FreeBSD right now, but this does work on OSX bash.