This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: --line-regexp option with null data


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,
Andrey Repin
Friday, July 17, 2015 05:29:11

Sorry for my terrible english...

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]