Extract a predefined number of lines from a text file

By | November 25, 2008

Sed can be wonderful. Say you want to extract lines 34 through 78 from a text file and output them into another file. Do it with

sed -n ‘34,78p’ < original.file > output.file

Leave a Reply

Your email address will not be published. Required fields are marked *