Another one-liner solution.
$ perl -ne 'BEGIN { <> for 1 .. 5 } print' file > newfile [download]
Cheers,
JohnGG
In reply to Re: Remove Lines from file by johngg in thread Remove Lines from file by jreyesb