The Bash glob matching issue is getting stranger and crazier the more I look at it. This is going to take a techblog entry.
-
-
-
@thatcks what if you export LC_COLLATE=C? -
@rone That makes things work, but now every script needs that at the start just to make sure Bash is not screwing it over. -
@thatcks i'm not sure if it's a bash thing or a locale thing. all i know is that i hate it. -
@rone It's a Bash thing. Other shells, eg Dash, don't behave this way even in en_US.UTF-8. -
@thatcks well shit, is there an open bug on this? god this is stupid -
@rone No idea, haven't looked. I assume it's deliberate choice on Bash's part and filing a bug would just result in being flamed.
-
-
-
@thatcks that's the en_US locale for you. [A-Z] expands to AaBbCc...Z, you need C locale to get just uppercase from [A-Z]. - View other replies
-
@alanc That is destructively crazy on Bash's part (and doesn't match other shells). It's going to make me abandon shell scripting entirely. -
@thatcks I thought it was common across most shells, is also why upper & lower case sort differently in ls output in C vs. en_US locale. -
@alanc Sort order isn't the same as matching [A-Z]. None of dash, zsh, mksh, or ksh do this (Ubuntu 14.04 versions for all). -
@thatcks oh hmm, I guess it's regexp's I'm thinking of having this well-known behavior in programs like tr, not shell globs
-
-
-
@thatcks and that's why I run LC_COLLATE=C. - View other replies
-
@chneukirchen Sadly this was a more or less stock root environment, instead of my carefully non-broken one. But things will have to be done.
-
-
-
@thatcks Unicode English collation isn't case-sensitive? -
@jonjensen0 Apparently not! This even happens on Ubuntu 12.04, I don't know why we didn't run into this before (with exploding scripts).
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
Chris Siebenmann
rone
Alan Coopersmith
Christian Neukirchen
Jon Jensen