GNU bug report logs - #30326
grep not searching through a text file (thinking it binary)

Previous Next

Package: grep;

Reported by: "L. A. Walsh" <gnu <at> tlinx.org>

Date: Fri, 2 Feb 2018 19:31:02 UTC

Severity: normal

Tags: notabug

Done: Eric Blake <eblake <at> redhat.com>

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: L A Walsh <gnu <at> tlinx.org>
Cc: 30326-done <at> debbugs.gnu.org, GNU bug control <control <at> debbugs.gnu.org>
Subject: bug#30326: grep not searching through a text file (thinking it binary)
Date: Fri, 2 Feb 2018 15:09:06 -0800
On 02/02/2018 12:09 PM, L A Walsh wrote:
> Grep was able to find text strings in mboxes without a POSIX
> definition telling it that it was "broken".

It's not a question of POSIX telling us what to do. It's a question of 
what is a good thing for GNU grep to do, and making sure that this 
behavior conforms to POSIX (at least if POSIXLY_CORRECT is set).

When grep encounters binary data, there are different "good" things to 
do depending on the application, so grep has options. The behavior 
you're asking for is available as an option. As I understand it, the 
main point of your bug report is that you want the option to be the 
default behavior. However, that would adversely affect some other common 
uses of grep and it's not clear that it's a good idea.





This bug report was last modified 7 years and 35 days ago.

Previous Next


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