sed – stream editor for filtering and transforming text

If you want to select a range of lines from a file, look no farther than your handy ‘sed’ utility. It is by definition, the perfect tool for the job!
$ sed -n '2,5p' filename
If you had a file that was just a bunch of line numbers, the output would be:
two
three
four
five
Posted by admica @ 18 January 2011