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: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#36820: closed (grep "[[:cntrl:]]" /proc/1/cmdline works on
 2.20 but not 3.3)
Date: Sat, 27 Jul 2019 17:17:03 +0000
[Message part 1 (text/plain, inline)]
Your message dated Sat, 27 Jul 2019 10:16:00 -0700
with message-id <d9636ab1-2b9d-b378-87d3-d0cf5e4e0808 <at> cs.ucla.edu>
and subject line Re: bug#36820: grep "[[:cntrl:]]" /proc/1/cmdline works on 2.20 but not 3.3
has caused the debbugs.gnu.org bug report #36820,
regarding grep "[[:cntrl:]]" /proc/1/cmdline works on 2.20 but not 3.3
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
36820: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=36820
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Jeff Chua <jeff.chua.linux <at> gmail.com>
To: bug-grep <at> gnu.org
Subject: grep "[[:cntrl:]]" /proc/1/cmdline works on 2.20 but not 3.3
Date: Sat, 27 Jul 2019 07:52:37 +0800
[Message part 3 (text/plain, inline)]
# using grep 2.20 ...
# grep "[[:cntrl:]]" /proc/1/cmdline
Binary file /proc/1/cmdline matches

# using grep 3.3 or above 2.20 ...
# grep "[[:cntrl:]]" /proc/1/cmdline
... nothing returned



My best.,
Jeff
[Message part 4 (text/html, inline)]
[Message part 5 (message/rfc822, inline)]
From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Jeff Chua <jeff.chua.linux <at> gmail.com>, 36820-done <at> debbugs.gnu.org
Subject: Re: bug#36820: grep "[[:cntrl:]]" /proc/1/cmdline works on 2.20 but
 not 3.3
Date: Sat, 27 Jul 2019 10:16:00 -0700
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.


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.