in reply to How to print the lines immediately above and below a matching line?
/tmp>grep -C1 halt /etc/passwd shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown halt:x:7:0:halt:/sbin:/sbin/halt mail:x:8:12:mail:/:/bin/false /tmp>ack -C1 halt /etc/passwd shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown halt:x:7:0:halt:/sbin:/sbin/halt mail:x:8:12:mail:/:/bin/false /tmp>
Alexander
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to print the lines immediately above and below a matching line?
by karlgoethebier (Abbot) on Nov 25, 2012 at 21:54 UTC | |
by afoken (Chancellor) on Nov 26, 2012 at 19:16 UTC | |
by karlgoethebier (Abbot) on Nov 27, 2012 at 18:34 UTC | |
|
Re^2: How to print the lines immediately above and below a matching line?
by Anonymous Monk on Nov 25, 2012 at 18:30 UTC |