Subject: Re: bug#23562: grep seems to write some error messages to stdout data stream --- shouldn't it be to stderr?
From: Paul Eggert <[email-masked]>
To: John Refling <[email-masked]>, [email-masked]
Date: Tue, 22 Sep 2020 12:03:54 -0700
List-Id: <debbugs-submit.debbugs.gnu.org>

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