--line-regexp option with null data
Fri Jul 17 02:35:00 GMT 2015
Greetings, John Hein!
> cygwin grep is detecting the input as binary which seems to be
> overriding the 'match the whole line' behavior of --line-regexp. Get
> rid of --quiet to see that.
> That does seem like a bug in the cygwin implementation of grep to me.
Linux grep will do the same.
null byte = not a text.
Wrong encoding, not matching locale = not a text.
This is an upstream decision. It is arguable consistent… on Linux.
On Windows, of course, this is not the case.
> As a workaround for this simple example, you can add -a (aka --text)
> to force it to treat the input as text.
With best regards,
Friday, July 17, 2015 05:29:11
Sorry for my terrible english...
More information about the Cygwin