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


View this message in rfc822 format

From: Duncan Roe <duncan_roe <at> optusnet.com.au>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: 51860-done <at> debbugs.gnu.org
Subject: bug#51860: [PATCH] Reinstate Binary file matches to stdout
Date: Tue, 23 Nov 2021 11:37:31 +1100
On Sat, Nov 20, 2021 at 10:59:43PM -0800, Paul Eggert wrote:
> On 11/20/21 17:38, Duncan Roe wrote:
> 
> > 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.
> 
Excellent. But I think you still need the patch below.

Cheers ... Duncan.


=======================

diff --git a/doc/grep.texi b/doc/grep.texi
index c3c4bbf..2482fa0 100644
--- a/doc/grep.texi
+++ b/doc/grep.texi
@@ -1819,8 +1819,7 @@ to output lines even from files that appear to be binary, use the
 @option{-a} or @samp{--binary-files=text} option.
 To eliminate the
 ``Binary file matches'' messages, use the @option{-I} or
-@samp{--binary-files=without-match} option,
-or the @option{-s} or @option{--no-messages} option.
+@samp{--binary-files=without-match} option.
 
 @item
 Why doesn't @samp{grep -lv} print non-matching file names?




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.