more useful options | |
PerlMonks |
Re: How can I print three lines before pattern match?by busunsl (Vicar) |
on Aug 14, 2009 at 07:25 UTC ( [id://788550]=note: print w/replies, xml ) | Need Help?? |
Do you have to use Perl? Of course it has to be Perl! ;-) Otherwise grep will do it: grep -B3 pattern logfile
In Section
Seekers of Perl Wisdom
|
|