perl -ne 'print if 4 .. 1' file perl -ne 'print if 4 .. 0' file # or perl -ne 'print if $. >= 4' file