grep replacement

Leonard H. Tower Jr. tower at bu-cs.BU.EDU
Tue Jun 7 07:44:34 AEST 1988


In article <6866 at elroy.Jpl.Nasa.Gov> alan at cogswell.Jpl.Nasa.Gov (Alan S. Mazer) writes:
|
|One thing I would _love_ is to be able to find the context of what I've
|found, for example, to find the two (n?) surrounding lines.  I have wanted
|to do this many times and there is no good way.

GNU Emacs has a command that will walk you through each match of a
grep run and show you the context around it:

   grep:
   Run grep, with user-specified args, and collect output in a buffer.
   While grep runs asynchronously, you can use the C-x ` command
   to find the text that grep hits refer to.

M-x grep RET to invoke it.  I suspect other Unix Emacs have a similar
feature.

Information on how to obtain GNU Emacs, other GNU software, or the GNU
project itself is available from:

	gnu at prep.ai.mit.edu

enjoy -len



More information about the Comp.unix.wizards mailing list