In bash version 4.3 and later, there is a shopt option called globasciiranges :
According to shopt builtin gnu man pages:
globasciiranges
If set, range expressions used in pattern matching bracket expressions (see Pattern Matching) behave as if in the traditional C locale when performing comparisons. That is, the current locale’s collating sequence is not taken into account, so ‘b’ will not collate between ‘A’ and ‘B’, and upper-case and lower-case ASCII characters will collate together.
As a result you can
$ shopt -s globasciiranges $ echo [A-Z]* Use shopt -u for disabling.
Another way is to change locale to C. You can do this temporarily using a subshell:
$ ( LC_ALL=C ; printf '%s\n' [A-Z]*; ) You will get the results you need, and when the sub shell is finished, the locale of your main shell remains unchanged to whatever was before.
Another alternative is instead of [A-Z] to use brace expansion {A..Z} together with nullglob bash shopt option.
By enabling nullblog, if a pattern is not matched during pathname expansion a null string is returned instead of the pattern it self.
As a result this one will work as expected:
$ shopt -s nullglob;printf '%s\n' {A..Z}*