Red Hat Bugzilla – Bug 24924
grep does not match [^]] OK due to RedHat patch
Last modified: 2005-10-31 17:00: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
$ ps ax | grep '[^]]progname'
To filter out all instances of progname except the grep invocation.
still doesn't work
Fixed in 2.5e-2
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.