grep version 2.5.3 and 2.5.4 bug with case-insensitive (-i) matching POSIX pattern class [[:upper:]]

View: New views
3 Messages — Rating Filter:   Alert me  

grep version 2.5.3 and 2.5.4 bug with case-insensitive (-i) matching POSIX pattern class [[:upper:]]

by Roman Revyakin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

There seems to be a bug in grep versions 2.5.3 and 2.5.4 executing
this sample piece of code:

echo "(A)" | grep -i "([[:upper:]])"

produces no output. grep version 2.5.1 works fine though:

echo "(A)" | grep -i "([[:upper:]])"
(A)

I compiled greps 2.5.3 and 2.5.1 on the Slackware 13 box from the
archives taken from

http://ftp.gnu.org/gnu/grep/

The grep 2.5.4 was shipped with the Slackware 13 itself.

Thanks in advance!

Regards,
Roman



Re: grep version 2.5.3 and 2.5.4 bug with case-insensitive (-i) matching POSIX pattern class [[:upper:]]

by Dave B-6 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wednesday 23 September 2009 02:48:15 Roman Revyakin wrote:

> There seems to be a bug in grep versions 2.5.3 and 2.5.4 executing
> this sample piece of code:
>
> echo "(A)" | grep -i "([[:upper:]])"
>
> produces no output. grep version 2.5.1 works fine though:
>
> echo "(A)" | grep -i "([[:upper:]])"
> (A)
>
> I compiled greps 2.5.3 and 2.5.1 on the Slackware 13 box from the
> archives taken from
>
> http://ftp.gnu.org/gnu/grep/
>
> The grep 2.5.4 was shipped with the Slackware 13 itself.

FWIW, works for me with grep 2.5.3:

$ echo "(A)" | grep -i "([[:upper:]])"
(A)
$ grep --version
GNU grep 2.5.3

Copyright (C) 1988, 1992-2002, 2004, 2005  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

--
D.



Re: grep version 2.5.3 and 2.5.4 bug with case-insensitive (-i) matching POSIX pattern class [[:upper:]]

by tangke :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

yes.me too
tangke@tangke-laptop:~$ echo "(A)" | grep -i "([[:upper:]])"
(A)

tangke@tangke-laptop:~$ grep --version
GNU grep 2.5.3

On 09/23/2009 04:05 PM, Dave B wrote:

> On Wednesday 23 September 2009 02:48:15 Roman Revyakin wrote:
>
>    
>> There seems to be a bug in grep versions 2.5.3 and 2.5.4 executing
>> this sample piece of code:
>>
>> echo "(A)" | grep -i "([[:upper:]])"
>>
>> produces no output. grep version 2.5.1 works fine though:
>>
>> echo "(A)" | grep -i "([[:upper:]])"
>> (A)
>>
>> I compiled greps 2.5.3 and 2.5.1 on the Slackware 13 box from the
>> archives taken from
>>
>> http://ftp.gnu.org/gnu/grep/
>>
>> The grep 2.5.4 was shipped with the Slackware 13 itself.
>>      
> FWIW, works for me with grep 2.5.3:
>
> $ echo "(A)" | grep -i "([[:upper:]])"
> (A)
> $ grep --version
> GNU grep 2.5.3
>
> Copyright (C) 1988, 1992-2002, 2004, 2005  Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.  There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
>
>    

[tangk.vcf]

begin:vcard
fn:tang ke
n:ke;tang
email;internet:tangk@...
tel;work:software developer
tel;cell:13962306738
version:2.1
end:vcard