grep [A-Z] & [a-z] match both upper and lower case.
I am using SuSE Linux 9.2
I noticed that grep ( version 2.5.1 ) matches the lower case letters when using the character range [A-Z].
For example: echo "mc C" | grep '[A-Z][A-Z] [A-Z]'
Sed behaves the same way.
After setting the environmental variable LC_ALL='C' grep behaves as expected.
My $LANG variable is en_US.UTF-8.
Is this behavior normal, or does it indicate that I have a bad locale setting, or some other goofy configuration setting?
One moral is to use [[:upper:]] and [[:lower:]] in scripts.
Last edited by jschiwal; 05-28-2005 at 06:43 AM.