in reply to write exact lines of file
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: write exact lines of file
by Jasper (Chaplain) on Oct 08, 2003 at 13:33 UTC |