GNU bug report logs - #20080
'.' fails to match null byte

Previous Next

Package: grep;

Reported by: Andreas Schwab <schwab <at> suse.de>

Date: Wed, 11 Mar 2015 14:33:01 UTC

Severity: normal

Done: Jim Meyering <jim <at> meyering.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Jim Meyering <jim <at> meyering.net>
To: Andreas Schwab <schwab <at> suse.de>
Cc: 20080 <at> debbugs.gnu.org
Subject: bug#20080: '.' fails to match null byte
Date: Wed, 11 Mar 2015 09:08:29 -0700
On Wed, Mar 11, 2015 at 7:32 AM, Andreas Schwab <schwab <at> suse.de> wrote:
> $ printf "a\0b\n" | src/grep a.b; echo $?
> 1

Thanks for the report.
However, that is now the expected behavior, and the change was
announced in grep-2.21.
You can use the --text (-a) option to make it match.
Here is the entry from the NEWS file:

** Changes in behavior

  When searching binary data, grep now may treat non-text bytes as
  line terminators.  This can boost performance significantly.




This bug report was last modified 10 years and 78 days ago.

Previous Next


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