summaryrefslogtreecommitdiff
path: root/man/building.texi
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>2006-07-17 20:58:27 +0000
committerRichard M. Stallman <rms@gnu.org>2006-07-17 20:58:27 +0000
commit7ae038f07e21a0fab4f515bb39c0340a66af1d84 (patch)
treef46704bcf207659fc43692b92f4bfcec2ab6851b /man/building.texi
parentdaeeeffc3fc165eb372bd9786bc38d13d39dff3e (diff)
downloademacs-7ae038f07e21a0fab4f515bb39c0340a66af1d84.tar.gz
(Grep Searching): Explain about chaining grep commands.
Diffstat (limited to 'man/building.texi')
-rw-r--r--man/building.texi14
1 files changed, 11 insertions, 3 deletions
diff --git a/man/building.texi b/man/building.texi
index e3ca90f2863..549c69da544 100644
--- a/man/building.texi
+++ b/man/building.texi
@@ -359,9 +359,17 @@ that specifies how to run @code{grep}. Use the same arguments you
would give @code{grep} when running it normally: a @code{grep}-style
regexp (usually in single-quotes to quote the shell's special
characters) followed by file names, which may use wildcards. If you
-specify a prefix argument for @kbd{M-x grep}, it detects the tag
-(@pxref{Tags}) around point, and puts that into the default
-@code{grep} command.
+specify a prefix argument for @kbd{M-x grep}, it finds the tag
+(@pxref{Tags}) in the buffer around point, and puts that into the
+default @code{grep} command.
+
+ Your command need not simply run @code{grep}; you can use any shell
+command that produces output in the same format. For instance, you
+can chain @code{grep} commands, like this:
+
+@example
+grep -nH -e foo *.el | grep bar | grep toto
+@end example
The output from @code{grep} goes in the @samp{*grep*} buffer. You
can find the corresponding lines in the original files using @w{@kbd{C-x