grep: Other Options

1 
1 2.1.7 Other Options
1 -------------------
1 
1 ‘--line-buffered’
1      Use line buffering on output.  This can cause a performance
1      penalty.
1 
1 ‘-U’
1 ‘--binary’
1      On platforms that distinguish between text and binary I/O, use the
1      latter when reading and writing files other than the user’s
1      terminal, so that all input bytes are read and written as-is.  This
1      overrides the default behavior where ‘grep’ follows the operating
1      system’s advice whether to use text or binary I/O.  On MS-Windows
1      when ‘grep’ uses text I/O it reads a carriage return–newline pair
1      as a newline and a Control-Z as end-of-file, and it writes a
1      newline as a carriage return–newline pair.
1 
1      When using text I/O ‘--byte-offset’ (‘-b’) counts and
1      ‘--binary-files’ heuristics apply to input data after text-I/O
1      processing.  Also, the ‘--binary-files’ heuristics need not agree
1      with the ‘--binary’ option; that is, they may treat the data as
11      text even if ‘--binary’ is given, or vice versa.  ⇒File and
      Directory Selection.
1 
1      This option has no effect on GNU and other POSIX-compatible
1      platforms, which do not distinguish text from binary I/O.
1 
1 ‘-z’
1 ‘--null-data’
1      Treat input and output data as sequences of lines, each terminated
1      by a zero byte (the ASCII NUL character) instead of a newline.
1      Like the ‘-Z’ or ‘--null’ option, this option can be used with
1      commands like ‘sort -z’ to process arbitrary file names.
1