hi,
if I grep a file, sometimes I want to see as an eg 2 lines above and below my grep results.
how can this be done
thanks
hi,
if I grep a file, sometimes I want to see as an eg 2 lines above and below my grep results.
how can this be done
thanks
grep -B2 -A2
-B before
-A after
which kind of grep support B and A option?
let's say
grep -C2
# or
grep -2