Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!rochester!udel!burdvax!pearl!lang From: lang@pearl.PRC.Unisys.COM (Francois-Michel Lang) Newsgroups: comp.unix.questions Subject: context-grep Keywords: grep Message-ID: <9176@burdvax.PRC.Unisys.COM> Date: 7 Feb 89 15:32:58 GMT Sender: news@PRC.Unisys.COM Lines: 15 I recall some time ago there was a discussion of some kind of variation on grep that could be used to show, e.g., all lines in a file containing "foo" occurring within, say, 6 lines of a line containing "bar". Is there anything available that will do this? I think I can use awk to do a watered-down version of this, but if it's already available somewhere, I'd love to see it! Many thanks. ---------------------------------------------------------------------------- Francois-Michel Lang Paoli Research Center, Unisys Corporation lang@prc.unisys.com (215) 648-7256 Dept of Comp & Info Science, U of PA lang@cis.upenn.edu (215) 898-9511