The sort utility is definitely broken, at least as it is implemented in Redhat 6.1 . Starting out with a new session after a complete Redhat 6.1 install (choosing "US" when asked for location), the install results in LANG, LC_ALL, and LINGUAS each set to en_US , and sort doesn't work properly. If you unset both LANG and LC_ALL and then set them back to en_US , then sort works properly. It doesn't matter what order you do the unsets and sets, as long as you do both. Sessions #1 and #2 below show the sequence; Session #1 unsets LANG first, Session #2 unsets LC_ALL first. This behavior was described to Jim Meyering; he thinks the sort is OK but he "suspect(s) that RH's locale data is buggy." This problem occurs when using sort (GNU textutils) 2.0 , but not when using sort (GNU textutils) 1.22 , even when both are used on the same Redhat 6.1 install. (There also is a bug with comm 2.0 but not in comm 1.22 ; perhaps there are similar bug characteristics. Further information on this problem can be forthcoming once there appears to be agreement that there is a bug in relation to using sort.) ---------------------------------------- SESSION # 1 $ set | egrep "^LANG|^LC|^LINGUAS" LANG=en_US LC_ALL=en_US LINGUAS=en_US $ cat x acd ari a q $ sort x acd a q ari $ unset LANG $ sort x acd a q ari $ unset LC_ALL $ sort x a q acd ari $ typeset LC_ALL=en_US $ sort x a q acd ari $ typeset LANG=en_US $ sort x a q acd ari $ set | egrep "^LANG|^LC|^LINGUAS" LANG=en_US LC_ALL=en_US LINGUAS=en_US ------------------------------------------- SESSION #2 $ set | egrep "^LANG|^LC|^LINGUAS" LANG=en_US LC_ALL=en_US LINGUAS=en_US $ cat x acd ari a q $ sort x acd a q ari $ unset LC_ALL $ sort x acd a q ari $ unset LANG $ sort x a q acd ari $ typeset LANG=en_US $ sort x a q acd ari $ typeset LC_ALL=en_US $ sort x a q acd ari $ set | egrep "^LANG|^LC|^LINGUAS" LANG=en_US LC_ALL=en_US LINGUAS=en_US $ --------------------------------------------- End of Sessions End of Bug Description =============================================
I've reverted sort to the old behavior in Raw Hide; to get the locale-specific one, use sort -l.