[Ilugc] Grep two lines from text file with different A and B switch
shakthimaan at gmail.com
Fri Jul 27 10:40:29 IST 2012
--- On Fri, Jul 27, 2012 at 8:26 AM, Balasubramaniam Natarajan
<bala150985 at gmail.com> wrote:
| The problem with $grep "MD5 |Network Activity" -A5 */reports/report.txt* is
| that after all the search I am getting 5 lines however I wanted to know if
| we can make two different -A switches for a single Grep command.
Tried the following?
$ grep -A1 -e "MD5" -A2 -e "Network Activity" */reports/report.txt*
More information about the ilugc