Xref: utzoo comp.unix.questions:8254 comp.unix.wizards:9929 Path: utzoo!attcan!uunet!lll-winken!lll-lcc!ames!ncar!boulder!sunybcs!rutgers!columbia!cunixc!fuat From: fuat@cunixc.columbia.edu (Fuat C. Baran) Newsgroups: comp.unix.questions,comp.unix.wizards Subject: Re: cgrep (context-grep) Keywords: grep Message-ID: <810@cunixc.columbia.edu> Date: 15 Jul 88 17:17:48 GMT References: <2985@cvl.umd.edu> <7464@elroy.Jpl.Nasa.Gov> Reply-To: fuat@cunixc.cc.columbia.edu (Fuat C. Baran) Distribution: na Organization: Columbia University Center for Computing Activities Lines: 32 In article <7464@elroy.Jpl.Nasa.Gov> alan@jane.Jpl.Nasa.Gov (Alan S. Mazer) writes: >In article <2985@cvl.umd.edu>, arensb@cvl.umd.edu (Andrew Arensburger) writes: >> I'm thinking of writing a utility called cgrep, which works just like grep > >You and everyone else. I've got one in C which is very similar to egrep, but >with one additional display-context option. You can select how many lines above >and below you want, and it uses egrep alone when it can. You're welcome to it. > -- Alan ..!cit-vax!elroy!alan * "But seriously, what > elroy!alan@csvax.caltech.edu could go wrong?" On our system we have a cgrep which seems to do what you want. I took a look at the sources. It carries the following notice: ** Cgrep - a program to extract context from text files. ** by David J. Iannucci @@ Saint Joseph's University, Philadelphia ** iannucci@@sjuvax.UUCP ** ** Copyright (c) 1986 ** ** You may do anything you like with this program except: ** 1. Use it to direct commercial advantage. ** 2. Take credit for any code I have written. I don't where we got this from (maybe one of the source groups?). --Fuat -- ARPANET: fuat@columbia.edu U.S. MAIL: Columbia University BITNET: fuat@cunixc.cc.columbia.edu Center for Computing Activities USENET: ...!rutgers!columbia!cunixc!fuat 712 Watson Labs, 612 W115th St. PHONE: (212) 280-5128 New York, NY 10025