bug-grep
[Top][All Lists]
Advanced

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

bug#23234: unexpected results with charset handling in GNU grep 2.23


From: Paul Eggert
Subject: bug#23234: unexpected results with charset handling in GNU grep 2.23
Date: Sat, 9 Apr 2016 20:07:18 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0

Norihiro Tanaka wrote:
Hmm, diff does not output "Binary file matches" between text files, but
grep does it.

I wasn't referring to the exact string "Binary file matches", merely to the idea that diff outputs a message to stdout saying that there was a binary file, rather than to stderr. Something like this:

$ diff /usr/bin/diff /usr/bin/emacs 2>/dev/null
Binary files /usr/bin/diff and /usr/bin/emacs differ

When a user got "Binary file matches" from grep, he can distinguish
whether matched a binary file or a line including "Binary file matches"
of a text file from only this result.

Although that's a problem, it's not a serious one, as one can easily work around it by using -n or -H. If there were need, I suppose we could add another operand to the --binary option to cause it to do something else with a match.





reply via email to

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