cgrep (grep with context)
Alan S. Mazer
alan at jane.Jpl.Nasa.Gov
Wed Jun 1 10:34:39 AEST 1988
Thanks to all the people who responded to my posted desire for a grep with
context. After playing around with awk and such (how hard could it be?), I
decided to write it in C. I'll be posting it to comp.unix.sources, but for
now, if you'd like it, let me know and I'll mail it to you. It's based on
egrep, with everything except the -b flag, I think, and allows you to display a
selectable number of lines of context both above and below your matching line
(and the numbers below and above needn't be the same). Seems to work with both
Berkeley and the other one :-). (Confidential to David Gast: Sorry, couldn't
work in the virus. Maybe next time :-).)
-- Alan ..!cit-vax!elroy!alan * "But seriously, what
elroy!alan at csvax.caltech.edu could go wrong?"
More information about the Comp.unix.wizards
mailing list