On Fri, Jun 21, 2013 at 02:39:14AM -0500, Dan Douglas wrote: > > If you're writing a script in bash, you MUST NOT use the [a-z] > > or [A-Z] ranges, or any other alphabetic ranges, unless you are > > working in the POSIX locale. If you use an alphabetic range in any > > other locale, you invite disaster. > > I can't reproduce this on a GNU system using en_US.UTF-8
Yes, *some* implementations go out of their way to try to make [a-z] work in the "intuitive" way. But if you want your script to be portable, you can't rely on that. > Are you saying this because certain implementations tend to behave > this way, or because it's implied by the spec? Because real computers behave in the way I demonstrated. "imadev" is the workstation sitting under my desk. It's what I'm typing this email on right now. It runs HP-UX 10.20. There are a very large number of old HP-UX 10.20 and 11.11 machines in the world. > I'd assume this has > more to do with your C library than to do with Bash specifically. True.