vampyre...@gmail.com wrote:
The documentation also states that -z affects only how input is interpreted.

I don't see where it does that, as the current documentation for -z talks about both "input and output data". That being said, the manual could be clearer. I installed the attached.
From 4648002a032d1c98fe39c7b6db1f59037296c019 Mon Sep 17 00:00:00 2001
From: Paul Eggert <egg...@cs.ucla.edu>
Date: Sat, 19 Nov 2016 01:58:45 -0800
Subject: [PATCH] grep: document -oz better

* doc/grep.texi (General Output Control, Usage): Tweak (Bug#24961).
---
 doc/grep.texi | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/doc/grep.texi b/doc/grep.texi
index ac821b4..9af13c4 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.:
-- 
2.7.4

Reply via email to