Subject: Re: bug#20638: BUG: standard & extended RE's don't find NUL's :-(

From: Eric Blake <[email-masked]>
Date: Sun, 24 May 2015 06:58:51 -0600

On 05/23/2015 06:04 PM, L. A. Walsh wrote:
> the standard & extended RE's don't find find NUL's:

Because NULs imply binary data, and grepping binary data has unspecified
results per POSIX.  What's more, the NEWS for 2.21 documents that grep
is now taking the liberty of treating NUL as a line terminator when -a
is not in effect, thanks to the behavior being otherwise unspecified by
POSIX.

Try using 'grep -a' to force grep to treat the file as non-binary, in
spite of the NULs.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org