[Ilugc] Grep two lines from text file with different A and B switch

Vignesh Nandha Kumar viky.nandha at gmail.com
Thu Jul 26 18:54:33 IST 2012


On Thu, Jul 26, 2012 at 6:24 PM, Balasubramaniam Natarajan <
bala150985 at gmail.com> wrote:

>
> However how can I get to do both of these in the same line so that their
> outputs are interleaved ?
>

You can use -e or --regexp to match multiple patterns, like
grep -e "Network Activity" -e "MD5 "

But I'm not sure if it's possible to say -A5 to only one of the patterns.


-- 
Vignesh Nandha Kumar
http://vigneshnandhakumar.in


More information about the ilugc mailing list