bug-grep
[Top][All Lists]
Advanced

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

bug#24347: Bug when grepping a text file with some arbitrary binary data


From: Paul Eggert
Subject: bug#24347: Bug when grepping a text file with some arbitrary binary data
Date: Mon, 12 Sep 2016 23:52:23 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0

address@hidden wrote:
this
is a case where meeting user expectations should outweigh being
POSIXly correct.

This issue is independent of POSIXLY_CORRECT, since POSIX does not specify what 'grep' should do when given non-text input. Portable scripts cannot rely on grep's default behavior here, as different grep implementations behave quite differently. Some even dump core (which POSIX allows!).

Just think how it will cut down the number of bug
reports about this

If only it would! But I'm afraid we'd start getting bug reports from the other side of the issue.

Anyway, as noted in Bug#22838 the heuristic has recently (post-2.5) been jogged in the direction that I think you prefer, and perhaps that will be good enough even if it's not exactly what you asked for. See:

http://git.savannah.gnu.org/cgit/grep.git/commit/?id=bf3ee23890db33e3d0bef5344e896d2cdfaa34aa





reply via email to

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