summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorJim Meyering <meyering@fb.com>2023-04-29 01:38:12 -0700
committerJim Meyering <meyering@meta.com>2023-04-29 01:38:31 -0700
commit7460d0f8b02714a7297ccf9349299cdacc2619bf (patch)
treea8da7f551a64282a4bcddfc49eb4587e928bfd34 /doc
parent92585cde9b5938d433738a873c8d44713d005f2c (diff)
downloadgrep-7460d0f8b02714a7297ccf9349299cdacc2619bf.tar.gz
doc: say that `-f -` reads patterns from stdin
* doc/grep.texi (Matching Control): Mention that when -f's FILE is -, grep reads patterns from stdin. * doc/grep.in.1: Likewise. * THANKS.in: Add the name. Suggested by Sebastian Carlos in https://bugs.gnu.org/63146
Diffstat (limited to 'doc')
-rw-r--r--doc/grep.in.15
-rw-r--r--doc/grep.texi1
2 files changed, 6 insertions, 0 deletions
diff --git a/doc/grep.in.1 b/doc/grep.in.1
index f7b8a03e..236791ee 100644
--- a/doc/grep.in.1
+++ b/doc/grep.in.1
@@ -244,6 +244,11 @@ If this option is used multiple times or is combined with the
.RB ( \-\^\-regexp )
option, search for all patterns given.
The empty file contains zero patterns, and therefore matches nothing.
+If
+.IR FILE
+is
+.B \-
+, read patterns from standard input.
.TP
.BR \-i ", " \-\^\-ignore\-case
Ignore case distinctions in patterns and input data,
diff --git a/doc/grep.texi b/doc/grep.texi
index e05ae257..ce6d6dc0 100644
--- a/doc/grep.texi
+++ b/doc/grep.texi
@@ -202,6 +202,7 @@ in a shell command.
Obtain patterns from @var{file}, one per line.
If this option is used multiple times or is combined with the
@option{-e} (@option{--regexp}) option, search for all patterns given.
+When @var{file} is @samp{-}, read patterns from standard input.
The empty file contains zero patterns, and therefore matches nothing.
(@option{-f} is specified by POSIX.)