summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorAlain Magloire <alainm@rcsm.ee.mcgill.ca>1999-08-13 15:02:53 +0000
committerAlain Magloire <alainm@rcsm.ee.mcgill.ca>1999-08-13 15:02:53 +0000
commitc29cb373d7cf8d8841d4bde5ffdb1ae4d14eb7ba (patch)
tree82e2351d60e15c5a638668f695f2f7161a12c147 /doc
parentaee993f557e9933c20d6e4753bf4ef2ee857b363 (diff)
downloadgrep-c29cb373d7cf8d8841d4bde5ffdb1ae4d14eb7ba.tar.gz
change by Paul Eggert.
change by Paul Eggert. change by Paul Eggert.
Diffstat (limited to 'doc')
-rw-r--r--doc/grep.texi24
1 files changed, 24 insertions, 0 deletions
diff --git a/doc/grep.texi b/doc/grep.texi
index c46afba6..ff5cac41 100644
--- a/doc/grep.texi
+++ b/doc/grep.texi
@@ -394,6 +394,30 @@ a Unix machine. This option has no effect unless @samp{-b}
option is also used; it is only supported on MS-DOS and
MS-Windows.
+@item -Z
+@itemx --null
+@opindex -Z
+@opindex --null
+@cindex zero-terminated file names
+Output a zero byte (the @sc{ASCII} @sc{NUL} character) instead of the
+character that normally follows a file name. For example, @samp{grep
+-lZ} outputs a zero byte after each file name instead of the usual
+newline. This option makes the output unambiguous, even in the presence
+of file names containing unusual characters like newlines. This option
+can be used with commands like @samp{find -print0}, @samp{perl -0},
+@samp{sort -z}, and @samp{xargs -0} to process arbitrary file names,
+even those that contain newline characters.
+
+@item -z
+@itemx --null-data
+@opindex -z
+@opindex --null-data
+@cindex zero-terminated lines
+Treat the input as a set of lines, each terminated by a zero byte (the
+@sc{ASCII} @sc{NUL} character) instead of a newline. Like the @samp{-Z}
+or @samp{--null} option, this option can be used with commands like
+@samp{sort -z} to process arbitrary file names.
+
@end table
Several additional options control which variant of the @sc{grep}