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

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

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

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

     

     

    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.5