perl -pe 'last if $. > 5' filename [download]
In reply to Re: how to print first 5 lines of a file by jmcnamara in thread how to print first 5 lines of a file by Anonymous Monk