Extract specific lines from a file, by file number

sed -n '[1st line no],[last line no]p' [infile] > [outfile]

Tags: