Description of problem: grep doesn't seem to be case sensitive on a range pattern anchored to the end of the line (i.e. '[A-Z]$' or '[a-z]]$'). Version-Release number of selected component (if applicable): grep-2.5.1-16 How reproducible: Always Steps to Reproduce: 1. Create a file (t.txt) that has the following in lines in it: This is a Test of GREP to seE if its working 12345 Another linE 2. run the command: grep '[A-Z]$' t.txt 3. run the command: grep '[ABCDEFGHIJKLMNOPQRSTUVWXYZ]$' t.txt 4. run the command: grep '[A-P]$' t.txt 5. run the commnad: grep '[ABCDEFGHIJKLMNOP]$' t.txt Actual results: [rds@rdsone ietmcm]$ grep '[A-Z]$' t.txt This is Test of GREP to seE if its working Another linE [rds@rdsone ietmcm]$ grep '[ABCDEFGHIJKLMNOPQRSTUVWXYZ]$' t.txt Test of GREP to seE Another linE [rds@rdsone ietmcm]$ grep '[A-P]$' t.txt Test of GREP to seE working Another linE [rds@rdsone ietmcm]$ grep '[ABCDEFGHIJKLMNOP]$' t.txt Test of GREP to seE Another linE Expected results: [rds@rdsone ietmcm]$ grep '[A-Z]$' t.txt Test of GREP to seE Another linE [rds@rdsone ietmcm]$ grep '[ABCDEFGHIJKLMNOPQRSTUVWXYZ]$' t.txt Test of GREP to seE Another linE [rds@rdsone ietmcm]$ grep '[A-P]$' t.txt Test of GREP to seE Another linE [rds@rdsone ietmcm]$ grep '[ABCDEFGHIJKLMNOP]$' t.txt Test of GREP to seE Another linE Additional info: none
[A-Z] is not generally a case-sensitive range, and neither is [a-z] -- except for the specific case of the C locale. Perhaps you mean to use '[[:upper:]]' and '[[:lower:]]'?