Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 24924 - grep does not match [^]] OK due to RedHat patch
grep does not match [^]] OK due to RedHat patch
Product: Red Hat Linux
Classification: Retired
Component: grep (Show other bugs)
All Linux
high Severity high
: ---
: ---
Assigned To: Bernhard Rosenkraenzer
Aaron Brown
Depends On:
  Show dependency treegraph
Reported: 2001-01-25 07:29 EST by Remco Wouts
Modified: 2005-10-31 17:00 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-02-09 10:08:04 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Remco Wouts 2001-01-25 07:29:50 EST
The following does work correctly in GNU grep 2.4.2:
$ echo -e "]name\n name" | grep '[^]]name'
It matches ' name' and does not match ']name' as it should.

However the RedHat patched version of GNU grep 2.4.2 matches /both/ ']name' 
and ' name'. This is not good especially since this construct is used a lot
in scripts 
like so:
$ ps ax | grep '[^]]progname'
To filter out all instances of progname except the grep invocation.
Comment 1 Karsten Hopp 2001-02-09 10:08:00 EST
still doesn't work
Comment 2 Bernhard Rosenkraenzer 2001-05-13 10:21:38 EDT
Fixed in 2.5e-2
Comment 3 Vlado Potisk 2001-08-24 15:49:50 EDT
Upgraded to 2.5e-2 to fix this one but it introduces a new bug
in grep causing ./configure scripts (autoconf) to give wrong
results ! Here is the proof: this line shows no match,
and that's incorrect
  echo "mode_t;" | grep "mode_t[^a-zA-Z_0-9]"
I checked Rawhide today and the 2.5-e2 version is no longer there,
there is 2.4.2-7 instead which appears not to have any of these bugs.

Note You need to log in before you can comment on or make changes to this bug.