Bruce Korb wrote: > $ echo [a-z]* > bin bk-archives Bugzilla core cron Desktop [[...]] > $ LC_COLLATE=C echo [a-z]* > bin bk-archives Bugzilla core cron Desktop [[...]]
Unfortunately in this case setting the variable on the command line for that command won't do what you want. Since file globbing takes place in the shell and not for the command the setting of the variable on-the-fly won't change the file globbing AFAIK. So the above is not a good test for this case. Try these: (unset LC_ALL LC_COLLATE LANG ; echo [a-z]*) (LC_COLLATE=en_US.UTF-8 ; echo [a-z]*) (LC_COLLATE=C ; echo [a-z]*) My results: $ (unset LC_ALL LC_COLLATE LANG ; echo [a-z]*) abc $ (LC_COLLATE=en_US.UTF-8 ; echo [a-z]*) abc DEF $ (LC_COLLATE=C ; echo [a-z]*) abc > $ set | egrep '^L' > LESS=-eMagis > LIBDIR=/home/usr/bkorb/Linux-i686/lib > LINES=70 > LOGNAME=bkorb That looks pretty convincing by itself that these are not set in the environment. > $ LC_COLLATE=C ; echo [a-z]* > bin bk-archives core cron [[...]] Agreed. > Apparently you are _REQUIRED_ to export LC_COLLATE with the value > "C". That's just wrong. Was that really intended? (I confess to > having been using ksh until recently, so if this is a long standing > tradition, I wouldn't have noticed.) I do not see that behavior here. I am using the stock bash distributed by Debian. At this point I suggest getting the sources and compiling up a pristine copy of bash. It could be there is a patch applied that is affecting this behavior. I don't think this behavior that you are seeing is intended and I cannot replicate the it. You might be chasing a patch bug. Bob _______________________________________________ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash