Xref: utzoo comp.unix.questions:8234 comp.unix.wizards:9915 Path: utzoo!attcan!uunet!lll-winken!lll-tis!ames!mailrus!husc6!bloom-beacon!mit-eddie!uw-beaver!fluke!inc From: inc@tc.fluke.COM (Gary Benson) Newsgroups: comp.unix.questions,comp.unix.wizards Subject: Re: cgrep (context-grep) Keywords: grep Message-ID: <4435@fluke.COM> Date: 14 Jul 88 23:22:16 GMT References: <2985@cvl.umd.edu> Sender: news@tc.fluke.COM Distribution: na Organization: John Fluke Mfg. Co., Inc., Everett, WA Lines: 28 arensb@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@tc.fluke.com_-_-_-_-_-_-_-_-_-_ Publication Services Ensign Benson, Space Cadet, Digital Circus, Sector R John Fluke Mfg. Co. Inc. _-_-_-_{uw-beaver, sun,microsoft}!fluke!inc-_-_-_-_-