![]() |
|
more useful options | |
PerlMonks |
Re: range of linesby delirium (Chaplain) |
on Jun 21, 2004 at 15:20 UTC ( [id://368471]=note: print w/replies, xml ) | Need Help?? |
If you happen to want the matching line printed in addition to the 5 lines after it, you could use the .. operator like so:
perl -ne 'print if /PATTERN/ .. ++$c%6==0;' file.txt
In Section
Seekers of Perl Wisdom
|
|