From Bugzilla Helper: User-Agent: Mozilla/4.78 [en] (X11; U; Linux 2.4.7-10 i686) Description of problem: When used in a shell script or when called as "bash -c", the filename glob "*" does not work properly. A match occurs when the case of the pathnames does not match the case in the glob regular expression. Wrong: ------ adam:~# bash -c "echo /tmp/de/[A-Z]*/setup" /tmp/de/java/setup /tmp/de/licensing/setup /tmp/de/RedHat/setup adam:~# ls -l /tmp/de total 448 drwxr-xr-x 2 21813 users 4096 Jan 21 17:50 array drwxr-xr-x 2 21813 users 4096 Jan 21 17:50 java drwxr-xr-x 2 21813 users 4096 Jan 21 17:51 licensing drwxr-xr-x 2 21813 users 4096 Jan 21 17:51 RedHat -r-xr--r-- 1 21813 users 2730 Jan 28 12:00 setup Right: ------ adam:~# echo /tmp/de/[A-Z]*/setup /tmp/de/RedHat/setup System Info: ------------ adam:~# rpm -qv bash bash-2.05-8 adam:~# rpm -qv redhat-release redhat-release-7.2-1 Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1. see above 2. 3. Actual Results: see above Expected Results: see above Additional info: see above
*** This bug has been marked as a duplicate of 58466 ***
I've read the description for bug 58466, and while setting LC_COLLATE to C does solve my particular problem, I'm still concerned that there is a bug in either the en_US locale or bash. To wit, the following two commands should yield identical results (unless "a" is a special letter in en_US, which I doubt is the case): adam:/tmp/de# bash -c "echo [A-Za-z]*/setup" array/setup java/setup licensing/setup RedHat/setup adam:/tmp/de# bash -c "echo [A-Z]*/setup" java/setup licensing/setup RedHat/setup adam:/tmp/de# echo $LANG en_US