buggrep - Bugs: bug #28981, grep -i '[A-Z]' finds only lower...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #28981: grep -i '[A-Z]' finds only lower case

Submitter:  None
Submitted:  Mon 22 Feb 2010 03:34:56 PM UTC
   
 
Category:  None Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Fixed Privacy:  Public
Assigned to:  None Open/Closed:  Closed

Discussion

Wed 17 Mar 2010 08:25:00 AM UTC, comment #1: 

This should work now.



Thank you for the bug report. This bug has been fixed in the
development sources, which can be downloaded using git from
git://git.sv.gnu.org/grep.git

Paolo Bonzini <bonzini>
Mon 22 Feb 2010 03:34:56 PM UTC, original submission:  

I have installed grep 2.5.4-2 as a part of a recent upgrade of my Cygwin environment.
I now have problems with some scripts that use 'grep -i' with a character class pattern.
It seems that the -i switch switches character class patterns to lower case instead of ignoring case.

REPEAT BY:
(Using grep 2.5.4-2 on Cygwin.)


# Create a test data file containing one upper case and one lower case data line:
echo "abc" > data
echo "ABC" >> data

# A fixed uppercase pattern
# should return the upper case line only:
echo "Test 1: expect ABC"
grep 'ABC' data

# Using a pattern with a character class containing
# upper case letters should return the same result:
echo "Test 2: expect ABC"
grep 'A[B]C' data

# Adding a '-i' to the first test run (fixed pattern)
# should return both upper case and lower case lines:
echo "Test 2: expect abc ABC"
grep -i 'ABC' data

# Adding a '-i' to the second test run (character class pattern)
# should also return both upper case and lower case lines:
echo "expect abc ABC"
grep -i 'A[B]C' data


Does this only not work for me or can anyone reproduce this problem?

Thanks for your support!
Best regards,
Matthias

Anonymous

 

Attached Files

This item currently has no attached files.

 

Dependencies

This item does not depend on any other items.

No items depend on this one.

 

Mail Notification Carbon-Copy List

Carbon-Copy List
  • -email is unavailable- added by bonzini (Posted a comment)
  •  

    Votes

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    History

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-03-17 bonzini StatusNone Fixed
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.16-598c.
    Corresponding source code