Unix command: head and tail

cat textfile | tail -n +2

This will show the textfile from the second line onwards.

cat textfile | head -n +2

This will show the textfile from the second to last line upwards

unix unix-head unix-tail

Edit on github
comments powered by Disqus
Click me