bash collating and LC_ALL

I was doing some bash reading and came across a discussion about collating. If I were to do the command below, rather than get all files that start with a uppercase letters, I’d get all files minus those that begin with “a” ([A-Zb-z]).

ls -ld [A-Z]*

The text talks about “LC_COLLATE”. I did a echo $LC_COLLATE and it appears empty. I did some googling/searches. This text talks about putting “export LC_ALL=C” at the beginning of your scripts.

Did anyone else come across this? Did you leave it, add LC_ALL, or change something, so [A-Z] only matches uppercase? The OpenSUSE install asked for Language. Was the install suppose to set these variables, or was there another step required?

Thank you.

As you do not show what you have in that working directory where you are doing the

ls -ld [A-Z]*

nor the contents of the directories there (because of the -d option) and not what the output is, how can we check what you are doing? You are describing your conclusions, not the facts.

When you think that output will be to long to post here, you can create a small test directory to show us:

cd <testdirectory>
ls -l
ls -ld [A-Z]*