In The Linux Command Line William Shotts claims that character ranges can be problematic. See the relevant excerpt below, emphasis is mine.
Character Ranges
If you are coming from another Unix-like environment or have been reading some other books on this subject, you may have encountered the
[A-Z]
and[a-z]
character range notations. These are traditional Unix notations and worked in older versions of Linux as well. They can still work, but you have to be careful with them because they will not produce the expected results unless properly configured. For now, you should avoid using them and use character classes instead.
What is he talking about in the last couple of sentences? What do the POSIX standards say about this?
[A-Z]
match lowercase letters in bash?LC_COLLATE
isn't even defined. It would be helpful to know more about this variable.