I sent this bug to GNU originally, but after some back-and-forth it turns out it doesn't exist in the vanilla build, so it must be some patch we're applying. (Incidentally, Fedora 7 has the same problem.) sort -R should randomize the order of lines given, but for some locales it doesn't. $ locale -a C en_US en_US.utf8 ja_JP ja_JP.eucjp ja_JP.utf8 POSIX zh_CN zh_CN.gb2312 zh_CN.gbk zh_CN.utf8 $ export -n LANG ${!LC*} # Unset all locale variables prior to testing $ for locale in C POSIX en_US ja_JP zh_CN; do > echo > echo "Testing locale $locale" > export LC_ALL="$locale" > seq 1 5 | sort -R > done Testing locale C 4 3 1 2 5 Testing locale POSIX 1 4 2 3 5 Testing locale en_US 3 1 5 4 2 Testing locale ja_JP 1 2 3 4 5 Testing locale zh_CN 1 2 3 4 5 sort -R should ignore locales altogether.
Created attachment 142663 [details, diff] Fix for sort -R in multibyte environments. This patch repairs the random sorting in multibyte environments. Created from the original sort.c sources.
The random sorting can be fixed without changing the multi-byte handling. See the patch above. This patch is only a suggestion, it should really be read carefully by whoever wrote the original i18n patches for sort.
coreutils-6.10-r2 in the tree with updated i18n patch. please re-open if this doesnt address your issue.