grep, etc
Jean-Pierre A. Radley
appl at jpr.com
Wed Aug 18 13:12:28 PDT 2004
Bob Stockler propounded (on Wed, Aug 18, 2004 at 03:31:43PM -0400):
| I have a little perl program (cgrep) that prints N (default 3)
| lines on each side of a line matching a pattern. If you want
| an uneven number of lines that would be fine (though slower that
| the AWK program), but if you wanted an even number of lines its
| output would have to be piped through grep -v to remove either
| the first or last line.
How is that any handier than the -C (or the -A and -B) options of GNU
grep?
--
JP
More information about the Filepro-list
mailing list