summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2016-11-19 01:58:45 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2016-11-19 01:59:24 -0800
commit16c0d20ba4923c496ef4e499319b6d18ca81711a (patch)
treeaff5ebbdad483e109fb77e8828d62198b162318e
parent92b41d7e9c4df1e3cbcdb3fcc955636e76edb8cf (diff)
downloadgrep-16c0d20ba4923c496ef4e499319b6d18ca81711a.tar.gz
grep: document -oz better
* doc/grep.texi (General Output Control, Usage): Tweak (Bug#24961).
-rw-r--r--doc/grep.texi5
1 files changed, 4 insertions, 1 deletions
diff --git a/doc/grep.texi b/doc/grep.texi
index ac821b47..9af13c42 100644
--- a/doc/grep.texi
+++ b/doc/grep.texi
@@ -355,6 +355,9 @@ When the @option{-v} or @option{--invert-match} option is also used,
@cindex only matching
Print only the matched (non-empty) parts of matching lines,
with each such part on a separate output line.
+Output lines use the same delimiters as input, and delimiters are null
+bytes if @option{-z} (@option{--null-data}) is also used (@pxref{Other
+Options}).
@item -q
@itemx --quiet
@@ -1768,7 +1771,7 @@ Therefore, merely using the @code{[:space:]} character class does not
match newlines in the way you might expect.
With the GNU @command{grep} option @option{-z} (@option{--null-data}), each
-input ``line'' is terminated by a null byte; @pxref{Other Options}. Thus,
+input and output ``line'' is null-terminated; @pxref{Other Options}. Thus,
you can match newlines in the input, but typically if there is a match
the entire input is output, so this usage is often combined with
output-suppressing options like @option{-q}, e.g.: