How can get I get the contents of a text file, except the last (for instance) 2 lines, with standard or GNU shell tools? (bash, tail, cat and so on.)
How to cat/print a file except the last 2 lines
awkbashsedshunix
awkbashsedshunix
How can get I get the contents of a text file, except the last (for instance) 2 lines, with standard or GNU shell tools? (bash, tail, cat and so on.)
Best Answer
Use the head command from coreutils:
See
info head
for more.