bug-grep
[Top][All Lists]
Advanced

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

bug#23562: grep seems to write some error messages to stdout data stream


From: Paul Eggert
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
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2

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.





reply via email to

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