grep-commit
[Top][All Lists]
Advanced

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

grep branch, master, updated. v3.7-65-ga7c8349


From: Paul Eggert
Subject: grep branch, master, updated. v3.7-65-ga7c8349
Date: Mon, 16 May 2022 15:19:08 -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  a7c8349894d24cf50e19ae4a6b10fa89d1fd9d87 (commit)
      from  078987db6df0edd5af630abf5987e95b02f8a8a3 (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 -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/grep.git/commit/?id=a7c8349894d24cf50e19ae4a6b10fa89d1fd9d87


commit a7c8349894d24cf50e19ae4a6b10fa89d1fd9d87
Author: Paul Eggert <eggert@cs.ucla.edu>
Date:   Mon May 16 12:18:26 2022 -0700

    grep: document -m better
    
    * doc/grep.in.1, doc/grep.texi: Document behavior of -m 0 and -m -1.
    This documents longstanding behavior, and is consistent with
    how git grep -m will likely behave.

diff --git a/doc/grep.in.1 b/doc/grep.in.1
index aba085a..5ba90ee 100644
--- a/doc/grep.in.1
+++ b/doc/grep.in.1
@@ -321,6 +321,16 @@ Scanning each input file stops upon first match.
 Stop reading a file after
 .I NUM
 matching lines.
+If
+.I NUM
+is zero,
+.B grep
+stops right away without reading input.
+A
+.I NUM
+of \-1 is treated as infinity and
+.B grep
+does not stop; this is the default.
 If the input is standard input from a regular file,
 and
 .I NUM
diff --git a/doc/grep.texi b/doc/grep.texi
index b9688c8..b073fa7 100644
--- a/doc/grep.texi
+++ b/doc/grep.texi
@@ -341,6 +341,10 @@ Scanning each input file stops upon first match.
 @opindex --max-count
 @cindex max-count
 Stop after the first @var{num} selected lines.
+If @var{num} is zero, @command{grep} stops right away without reading input.
+A @var{num} of @minus{}1 is treated as infinity and @command{grep}
+does not stop; this is the default.
+
 If the input is standard input from a regular file,
 and @var{num} selected lines are output,
 @command{grep} ensures that the standard input is positioned

-----------------------------------------------------------------------

Summary of changes:
 doc/grep.in.1 | 10 ++++++++++
 doc/grep.texi |  4 ++++
 2 files changed, 14 insertions(+)


hooks/post-receive
-- 
grep



reply via email to

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