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.