(NOTE: I submitted this bug to tcsh-bugs.com today) % touch abc def ghi ABC DEF GHI % echo * ABC abc DEF def GHI ghi % echo [a-z]* abc DEF def GHI ghi <<< DEF and GHI shouldn't show up % echo [A-Z]* ABC abc DEF def GHI ghi <<< abc, def, and ghi shouldn't show up % echo $tcsh 6.08.00 % uname -a Linux vaio 2.2.12-20 #1 Mon Sep 27 10:40:35 EDT 1999 i686 unknown (REDHAT 6.1) For what it's worth, I don't see this in older tcsh version 6.04.00 under Irix.
I have 2 redhat linux machines; one running 6.0 and one running 6.1. I only see the bug in *6.1*, even though both TCSH versions appear to be identical versions -- these are the output of 'echo $version' from my tcsh's: RedHat 6.1: tcsh 6.08.00 (Astron) 1998-10-02 (i386-intel-linux) options 8b,nls,dl,al,rh,color RedHat 6.0: tcsh 6.08.00 (Astron) 1998-10-02 (i486-intel-linux) options 8b,nls,dl,al,rh,color
I've narrowed it down to the LANG stuff, after talking with the tcsh folks. Basically it's to do with the LANG variables setup by RedHat 6.1's /etc/csh.login. If I rename out /etc/csh.login, then invoke a new login, the problem is corrected. Using the above directory scenario, the results are: > echo [a-z]* abc def ghi <-- looks OK > setenv LANG "en_US" ; setenv LC_ALL "en_US"; setenv LINGUAS "en_US" > echo [a-z]* abc DEF def GHI ghi <-- now it's BAD > unsetenv LANG ; unsetenv LC_ALL; unsetenv LINGUAS <-- unset them > echo [a-z]* abc DEF def GHI ghi <-- still BAD must be cached. > setenv LANG "" ; setenv LC_ALL ""; setenv LINGUAS "" <-- set to "" > echo [a-z]* abc def ghi <-- now it's ok again It would appear to be a problem with en_US..?
This is most probably the "glibc problem with locales". Changing component.
It's not a bug, it's a feature in glibc - case doesn't matter for sorting strings. It would be a bug in tcsh not to handle it slightly different.