GNU bug report logs - #23562
grep seems to write some error messages to stdout data stream --- shouldn't it be to stderr?

Previous Next

Package: grep;

Reported by: "John Refling" <netbsdrat <at> gmail.com>

Date: Tue, 17 May 2016 06:31:02 UTC

Severity: wishlist

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


Message #15 received at 23562-done <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: John Refling <netbsdrat <at> gmail.com>, 23562-done <at> debbugs.gnu.org
Subject: Re: bug#23562: grep seems to write some error messages to stdout data
 stream --- shouldn't it be to stderr?
Date: Tue, 22 Sep 2020 12:03:54 -0700
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




This bug report was last modified 4 years and 246 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.