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


View this message in rfc822 format

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: John Refling <netbsdrat <at> gmail.com>, 23562 <at> debbugs.gnu.org
Subject: bug#23562: grep seems to write some error messages to stdout data stream --- shouldn't it be to stderr?
Date: Mon, 16 May 2016 23:45:52 -0700
John Refling wrote:
> Binary file src/grep.exe matches
> 
> ... error messages should NEVER be injected into the same stream as the
> users input / output dat

It's not an error message.

> grep should NEVER add more data to the output stream than
> was in the input stream

grep has always done that sort of thing. E.g., grep has put file names into the
output stream ever since the 1970s.

Perhaps there should be an option for 'grep' to treat binary matches as errors
and to issue diagnostics on stderr rather than issue info on stdout. That being
said, the current behavior is useful too, and has been in place since the 1990s,
and changes in this area should not be made casually.




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.