URL:
  <http://savannah.gnu.org/bugs/?28981>

                 Summary: grep -i '[A-Z]' finds only lower case
                 Project: grep
            Submitted by: None
            Submitted on: Mo 22 Feb 2010 15:34:56 UTC
                Category: None
                Severity: 3 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

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




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?28981>

_______________________________________________
  Nachricht geschickt von/durch Savannah
  http://savannah.gnu.org/



Reply via email to