cgrep (context-grep)

Gary Benson inc at tc.fluke.COM
Fri Jul 15 09:22:16 AEST 1988


arensb at cvl.umd.edu (Andrew Arensburger) writes:

"	I'm thinking of writing a utility called cgrep, which works just
"like grep, but instead of writing out just the line on which the pattern
"was found, would write out a couple of lines surrounding the line in
"question.
"	Has anyone implemented this, or am I going to have to write it?


Write it! There was quite a discussion here recently about just such a
utility, but noone seemed interested enough to go off and do it. Judging
from the interest level, though, apparently I am not the only one who'd make
use of it. Here's my application:

I have a program that inserts typestting codes into a file, flagging
unrecognized text elements for later manual coding. I'd like to not just
grep for the flags, but be able to see a little of the context that caused
the flag. In fact, if you can add an option to DISinclude the pattern and
show only the context requested, it would be even more useful in my case,
since all the flags look the same -- I don't want to see them at all,
actually, just the text entity that caused it.

Good luck - Please email me a beta test version!


-- 
Gary Benson		   -_-_-_-_-_-_-_-_-inc at tc.fluke.com_-_-_-_-_-_-_-_-_-_
Publication Services	   Ensign Benson, Space Cadet, Digital Circus, Sector R
John Fluke Mfg. Co. Inc.   _-_-_-_{uw-beaver, sun,microsoft}!fluke!inc-_-_-_-_-



More information about the Comp.unix.questions mailing list