[Ilugc] Grep two lines from text file with different A and B switch
- From: viky.nandha@xxxxxxxxx (Vignesh Nandha Kumar)
- Date: Thu, 26 Jul 2012 18:54:33 +0530
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
Other related posts: