how do you skip the last line w/ awk?

Viewed 17343

I am processing a file with awk and need to skip some lines. The internet dosen't have a good answer.

So far the only info I have is that you can skip a range by doing:

awk 'NR==6,NR==13 {print}' input.file

OR

awk 'NR <= 5 { next } NR > 13 {exit} { print}' input.file

You can skip the first line by inputting:

awk 'NR < 1 { exit } { print}' db_berths.txt

How do you skip the last line?

2 Answers
Related