I think a simpler solution would be to use head and tail: head -n x > file.txt tail -n x-n file.txt > file2.txt Xavier Noria wrote: > On Apr 10, 2008, at 18:24 , Jonathan Mast wrote: > >> Hi, I have a ~125MB file of which I want to read lines n thru n+x and >> write >> those into a separate file. What is the best way to go about this? > > Tie::File > -- "If you do things right people won't be sure you've done anything at all." Keep up with me and what I'm up to: http://theillien.blogspot.comThread Previous