perl -ne 'print if 4 .. eof' file
Fifth line to tenth:
perl -ne 'print if 5 .. 10' file
Note, in the first example the eof if mainly a visual indicator. The following would work just as well:
perl -ne 'print if 4 .. 1' file perl -ne 'print if 4 .. 0' file # or perl -ne 'print if $. >= 4' file
--
John.
In reply to Re: write exact lines of file
by jmcnamara
in thread write exact lines of file
by b1rd
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |