GNU bug report logs - #51860
[PATCH] Reinstate Binary file matches to stdout

Previous Next

Package: grep;

Reported by: Duncan Roe <duncan_roe <at> optusnet.com.au>

Date: Mon, 15 Nov 2021 06:08:02 UTC

Severity: normal

Tags: patch

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

Bug is archived. No further changes may be made.

Full log


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

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Duncan Roe <duncan_roe <at> optusnet.com.au>
Cc: 51860-done <at> debbugs.gnu.org
Subject: Re: bug#51860: [PATCH] Reinstate Binary file matches to stdout
Date: Sat, 20 Nov 2021 22:59:43 -0800
[Message part 1 (text/plain, inline)]
On 11/20/21 17:38, Duncan Roe wrote:

> This was *documented* *behaviour*.

No, it wasn't documented whether the "Binary file matches" message is 
sent to stdout or to stderr. But now that you mention it, this should be 
documented. First patch attached, and installed into the development 
version.


> I'd further suggest biaary matches output to stderr by the new option be not
> affected by the setting of `-s`, only by `-I`. This reinstates orthogonality of
> -s and -I which 271793f0 broke.

Hmm, you have a point that -s is documented to "Suppress error messages 
about nonexistent or unreadable files" and it's plausible to say that 
the "binary file matches" diagnostic, although it is about a binary file 
that 'grep' has some trouble reading, is not about a file that is 
"unreadable". So, let's fix the code to match that part of the spec 
again. Second patch attached and installed.

> Since you have provided me with a workaround, I have no further interset in this
> bug.

OK, closing the bug report. Thanks for reporting the issues.
[0001-doc-binary-file-matches-stderr-Bug-51860.patch (text/x-patch, attachment)]
[0002-grep-s-does-not-suppress-binary-file-matches.patch (text/x-patch, attachment)]

This bug report was last modified 3 years and 240 days ago.

Previous Next


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