Subject: Re: bug#36820: grep "[[:cntrl:]]" /proc/1/cmdline works on 2.20 but not 3.3

From: Jeff Chua <[email-masked]>
Date: Sun, 28 Jul 2019 16:04:48 +0800

> 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 <[email-masked]> 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.
>