daveb@rtech.UUCP (05/15/86)
A while back a 'cgrep' program was posted. While I found the idea good (I've often wanted context around grep output), it seemed annoying that the program required additional arguments to get context, and didn't take regular expressions. Then I remembered the 'context' program posted about 9 months ago, and used to decipher the output of compiler error messages. grep -n pattern files | context does very nearly just what I want, without having to think about new tools and new flags. -db -- Calrissian: "It's not my fault!" {amdahl, sun, mtxinu, cbosgd}!rtech!daveb
iannucci@sjuvax.UUCP (05/21/86)
In article <256@rtech.UUCP> daveb@rtech.UUCP writes: > A while back a 'cgrep' program was posted. While I found the idea good > (I've often wanted context around grep output), it seemed annoying that > the program required additional arguments to get context, and didn't > take regular expressions. As a matter of fact, I was going (in the very near future) to post an update which can find the nth occurrence instead of always the 1st, and which understands ^ and $. Regular expressions are a bit beyond the scope of the project right now. > Then I remembered the 'context' program posted about 9 months ago, and... > ...does very nearly just what I want, without having to think about new > tools and new flags. > -db I don't see how it is possible to get an arbitrary desired context without telling the program exactly what you want. But I would be more than happy to hear about it. Maybe I will wait to repost cgrep and perhaps incorporate some of these new ideas. -- If I could walk THAT way.... Dave Iannucci @ St. Joseph's University, Philadelphia [40 00' N 75 15' W] {{ihnp4 | ucbvax}!allegra | {psuvax1}!burdvax | astrovax}!sjuvax!iannucci