Index: grep/doc/grep.texi
diff -u grep/doc/grep.texi:1.57 grep/doc/grep.texi:1.58
--- grep/doc/grep.texi:1.57 Tue Nov 8 19:45:05 2005
+++ grep/doc/grep.texi Tue Nov 8 21:35:33 2005
@@ -87,9 +87,9 @@
@ifnottex
@node Top
[EMAIL PROTECTED] Grep
[EMAIL PROTECTED] grep
[EMAIL PROTECTED] searches for lines matching a pattern.
+The @command{grep} command searches for lines matching a pattern.
This document was produced for version @value{VERSION} of @sc{gnu}
@command{grep}.
@@ -99,7 +99,7 @@
* Introduction:: Introduction.
* Invoking:: Invoking @command{grep}; description of
options.
* Diagnostics:: Exit status returned by @command{grep}.
-* Grep Programs:: @command{grep} programs.
+* grep Programs:: @command{grep} programs.
* Regular Expressions:: Regular Expressions.
* Usage:: Examples.
* Reporting Bugs:: Reporting Bugs.
@@ -115,7 +115,7 @@
@cindex Searching for a pattern.
[EMAIL PROTECTED] searches the input files
+The @command{grep} command searches the input files
for lines containing a match to a given
pattern list. When it finds a match in a line, it copies the line to standard
output (by default), or does whatever other sort of output you have requested
@@ -375,8 +375,8 @@
@opindex --label
@cindex changing name of standard input
Display input actually coming from standard input as input coming from file
[EMAIL PROTECTED] This is especially useful for tools like zgrep, e.g.
[EMAIL PROTECTED] -cd foo.gz |grep --label=foo something}
[EMAIL PROTECTED] This is especially useful for tools like @command{zgrep},
e.g.,
[EMAIL PROTECTED] -cd foo.gz | grep --label=foo something}
@item -L
@itemx --files-without-match
@@ -567,11 +567,12 @@
@end table
Several additional options control which variant of the @command{grep}
-matching engine is used. @xref{Grep Programs}.
+matching engine is used. @xref{grep Programs}.
@section Environment Variables
-Grep's behavior is affected by the following environment variables.
+The behavior of @command{grep} is affected
+by the following environment variables.
A locale @[EMAIL PROTECTED] is specified by examining the three
environment variables @env{LC_ALL}, @[EMAIL PROTECTED], and @env{LANG},
@@ -707,13 +708,15 @@
@option{--quiet} or @option{--silent} option is used and a selected line
is found.
[EMAIL PROTECTED] Grep Programs
[EMAIL PROTECTED] grep Programs
@chapter @command{grep} programs
[EMAIL PROTECTED] searches the named input files (or standard input if no
-files are named, or the file name @file{-} is given) for lines containing
-a match to the given pattern. By default, @command{grep} prints the
-matching lines. There are four major variants of @command{grep},
+The @command{grep} command searches the named input files
+(or standard input if no files are named,
+or the file name @file{-} is given)
+for lines containing a match to the given pattern.
+By default, @command{grep} prints the matching lines.
+There are four major variants of @command{grep},
controlled by the following options.
@table @samp
@@ -749,9 +752,14 @@
@end table
-In addition, two variant programs @sc{egrep} and @sc{fgrep} are available.
[EMAIL PROTECTED] is the same as @samp{grep -E}. @sc{fgrep} is the
-same as @samp{grep -F}.
+In addition,
+two variant programs @command{egrep} and @command{fgrep} are available.
[EMAIL PROTECTED] is the same as @samp{grep@ -E}.
[EMAIL PROTECTED] is the same as @samp{grep@ -F}.
+Direct invocation as either
[EMAIL PROTECTED] or @command{fgrep} is deprecated,
+but is provided to allow historical applications
+that rely on them to run unmodified.
@node Regular Expressions
@chapter Regular Expressions
@@ -1042,13 +1050,13 @@
@cindex interval specifications
Traditional @command{egrep} did not support the @[EMAIL PROTECTED]
metacharacter,
and some @command{egrep} implementations support @[EMAIL PROTECTED] instead, so
-portable scripts should avoid @[EMAIL PROTECTED] in @samp{egrep} patterns and
+portable scripts should avoid @[EMAIL PROTECTED] in @samp{grep@ -E} patterns
and
should use @[EMAIL PROTECTED] to match a literal @[EMAIL PROTECTED]
[EMAIL PROTECTED] @command{egrep} attempts to support traditional usage by
[EMAIL PROTECTED] @command{grep@ -E} attempts to support traditional usage by
assuming that @[EMAIL PROTECTED] is not special if it would be the start of an
invalid interval specification. For example, the shell command
[EMAIL PROTECTED] '@{1'} searches for the two-character string @[EMAIL
PROTECTED]
[EMAIL PROTECTED]@ -E@ '@{1'} searches for the two-character string @[EMAIL
PROTECTED]
instead of reporting a syntax error in the regular expression.
@sc{posix.2} allows this behavior as an extension, but portable scripts
should avoid it.
@@ -1244,7 +1252,7 @@
characters long.
@example
-egrep -e '^(.?)(.?)(.?)(.?)(.?)(.?)(.?)(.?)(.?).?\9\8\7\6\5\4\3\2\1$' file
+grep -E -e '^(.?)(.?)(.?)(.?)(.?)(.?)(.?)(.?)(.?).?\9\8\7\6\5\4\3\2\1$' file
@end example
Note this is done by using GNU ERE extensions, it might not be portable on
@@ -1254,7 +1262,7 @@
Why is this back-reference failing?
@example
-echo 'ba' | egrep '(a)\1|b\1'
+echo 'ba' | grep -E '(a)\1|b\1'
@end example
This gives no output, because the first alternate @samp{(a)\1} does not match,
@@ -1264,7 +1272,7 @@
matched -- making the second one superfluous.)
@item
-What do @command{grep, fgrep, egrep} stand for?
+What do @command{grep}, @command{fgrep}, and @command{egrep} stand for?
The name @command{grep} comes from the way line editing was done on Unix. For
example, @command{ed} uses the following syntax to print a list of matching
@@ -1275,8 +1283,8 @@
g/re/p
@end example
[EMAIL PROTECTED] stands for Fixed @command{grep}, @command{egrep} Extended
[EMAIL PROTECTED]
[EMAIL PROTECTED] stands for Fixed @command{grep};
[EMAIL PROTECTED] stands for Extended @command{grep}.
@end enumerate