[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

grep branch, master, updated. v3.7-4-gf3da64c

From: Paul Eggert
Subject: grep branch, master, updated. v3.7-4-gf3da64c
Date: Mon, 16 Aug 2021 21:42:34 -0400 (EDT)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "grep".

The branch, master has been updated
       via  f3da64c603f38591046e1a04b317d7863b8c7d09 (commit)
      from  a9515624709865d480e3142fd959bccd1c9372d1 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------

commit f3da64c603f38591046e1a04b317d7863b8c7d09
Author: Paul Eggert <>
Date:   Mon Aug 16 18:41:44 2021 -0700

    doc: modernize portability advice
    * doc/grep.texi (General Output Control, Basic vs Extended):
    No need to complicate the portability advice by talking about 7th
    edition grep, since it’s no longer a practical porting target.
    Instead, mention only Solaris 10 grep, the last practical holdout
    of somewhat-traditional grep.

diff --git a/doc/grep.texi b/doc/grep.texi
index 3236b98..b92ecb7 100644
--- a/doc/grep.texi
+++ b/doc/grep.texi
@@ -398,6 +398,9 @@ Quiet; do not write anything to standard output.
 Exit immediately with zero status if any match is found,
 even if an error was detected.
 Also see the @option{-s} or @option{--no-messages} option.
+Portability note: Solaris 10 @command{grep} lacks @option{-q};
+portable shell scripts typically can redirect standard output to
+@file{/dev/null} instead of using @option{-q}.
 (@option{-q} is specified by POSIX.)
 @item -s
@@ -406,18 +409,6 @@ Also see the @option{-s} or @option{--no-messages} option.
 @opindex --no-messages
 @cindex suppress error messages
 Suppress error messages about nonexistent or unreadable files.
-Portability note:
-unlike GNU @command{grep},
-7th Edition Unix @command{grep} did not conform to POSIX,
-because it lacked @option{-q}
-and its @option{-s} option behaved like
-GNU @command{grep}'s @option{-q} option.@footnote{Of course, 7th Edition
-Unix predated POSIX by several years!}
-USG-style @command{grep} also lacked @option{-q}
-but its @option{-s} option behaved like GNU @command{grep}'s.
-Portable shell scripts should avoid both
-@option{-q} and @option{-s} and should redirect
-standard and error output to @file{/dev/null} instead.
 (@option{-s} is specified by POSIX.)
 @end table
@@ -1560,14 +1551,8 @@ part of an interval expression.
 @end itemize
 @cindex interval expressions
-Traditional @command{egrep} did not support interval expressions and
-some @command{egrep} implementations use @samp{\@{} and @samp{\@}} instead, so
-portable scripts should avoid interval expressions in @samp{grep@ -E} patterns
-and should use @samp{[@{]} to match a literal @samp{@{}.
-GNU @command{grep@ -E} attempts to support traditional usage by
-assuming that @samp{@{} is not special if it would be the start of an
-invalid interval expression.
+GNU @samp{grep@ -E} treats @samp{@{} as special
+only if it begins a valid interval expression.
 For example, the command
 @samp{grep@ -E@ '@{1'} searches for the two-character string @samp{@{1}
 instead of reporting a syntax error in the regular expression.


Summary of changes:
 doc/grep.texi | 25 +++++--------------------
 1 file changed, 5 insertions(+), 20 deletions(-)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]