|
|
| Welcome to the Monastery | |
| PerlMonks |
Re: range of linesby delirium (Chaplain) |
| on Jun 21, 2004 at 11:20 UTC ( [id://368471]=note: print w/replies, xml ) | Need Help?? |
This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.
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
|
|
||||||||||||||||||||||||||||