bug-grep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#24347: Bug when grepping a text file with some arbitrary binary data


From: Paul Eggert
Subject: bug#24347: Bug when grepping a text file with some arbitrary binary data
Date: Mon, 12 Sep 2016 16:10:45 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0

On 09/12/2016 03:16 PM, Karl Berry wrote:
     Either of the following shell commands should work with grep 2.25:
     LC_ALL=C grep 31325 test
     grep -a 31325 test

In my grep 2.25 (compiled from original source), these two commands are
not equivalent.

They are not equivalent in general, though they should have the same behavior with this bug report's original test case. Sorry, I should have been clearer about that.

The difference is that grep -a treats the NUL byte as text, whereas LC_ALL=C grep treats it as binary. The latter has been longstanding behavior for quite some time.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]