2.1.7 Other Options
- Use line buffering on output.
This can cause a performance penalty.
- This option is deprecated and now elicits a warning, but is otherwise a no-op.
It used to make grep read
input with the
mmap system call, instead of the default
system call. On modern systems,
mmap would rarely if ever yield
- Treat the file(s) as binary.
By default, under MS-DOS and MS-Windows,
grep guesses whether a file is text or binary
as described for the --binary-files option.
If grep decides the file is a text file,
it strips the
CR characters from the original file contents
(to make regular expressions with
$ work correctly).
Specifying -U overrules this guesswork,
causing all files to be read and passed to the matching mechanism verbatim;
if the file is a text file with
CR/LF pairs at the end of each line,
this will cause some regular expressions to fail.
This option has no effect
on platforms other than MS-DOS and MS-Windows.
- Treat the input as a set of lines, each terminated by a zero byte (the
NUL character) instead of a newline.
Like the -Z or --null option,
this option can be used with commands like
‘sort -z’ to process arbitrary file names.