GNU bug report logs - #36820
grep "[[:cntrl:]]" /proc/1/cmdline works on 2.20 but not 3.3

Previous Next

Package: grep;

Reported by: Jeff Chua <jeff.chua.linux <at> gmail.com>

Date: Sat, 27 Jul 2019 00:15:02 UTC

Severity: normal

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: Jeff Chua <jeff.chua.linux <at> gmail.com>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: 36820-done <at> debbugs.gnu.org
Subject: bug#36820: grep "[[:cntrl:]]" /proc/1/cmdline works on 2.20 but not 3.3
Date: Sun, 28 Jul 2019 16:04:48 +0800
[Message part 1 (text/plain, inline)]
> This is documented behavior; the grep manual says that when grep is
reading a
binary file it "may treat non-text bytes as line terminators".
> You can use grep's -a (--text) option to if you want to match null bytes.

Paul,

Thanks for pointing this out. Didn't know that as it works on 2.20.

Then if it's binary file, grep should default to "-a" to make it compatible
with the old behavior?

My best.,
Jeff


On Sun, Jul 28, 2019 at 1:16 AM Paul Eggert <eggert <at> cs.ucla.edu> wrote:

> This is documented behavior; the grep manual says that when grep is
> reading a
> binary file it "may treat non-text bytes as line terminators".
>
> You can use grep's -a (--text) option to if you want to match null bytes.
>
[Message part 2 (text/html, inline)]

This bug report was last modified 5 years and 274 days ago.

Previous Next


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