On 5/16/16 11:03 PM, John Refling wrote:
error messages should NEVER be injected into the same stream as the users input / output data, firstly because it corrupts the data, and secondly if the output is redirected, the user will never see the error message.
On further thought (and after getting other bug reports) you make a good point, and GNU grep's binary-file diagnostics will be sent to stderr instead of stdout starting with the next release. See:
https://git.savannah.gnu.org/cgit/grep.git/commit/?id=271793f09cc604ad54ad89b18110716555cc748b