Am 27.07.2016 um 17:33 schrieb Bertram Scharpf: > Hi, > > bsch@host ~ % mkdir showsort > user@host ~ % cd showsort > user@host ~/showsort % touch .A .Z .a .z A Z a z > user@host ~/showsort % set | grep -a '^\(LANG\|LC_\)' > LANG=de_DE.utf8 > LC_ALL=de_DE.utf8 > LC_COLLATE=C
> > Why doesn't ls obey LC_COLLATE=C and how can I fix this? > Look at the description of LC_ALL: LC_ALL If set to a non-empty string value, override the values of all the other internationalization variables. Then do only set LANG and LC_COLLATE and not (!) LC_ALL. You can run the tool "locale". It will show the effective values used for each locale category. For your settings: $ LANG=de_DE.utf8 LC_ALL=de_DE.utf8 LC_COLLATE=C locale LANG=de_DE.utf8 LC_CTYPE="de_DE.utf8" LC_NUMERIC="de_DE.utf8" LC_TIME="de_DE.utf8" LC_COLLATE="de_DE.utf8" LC_MONETARY="de_DE.utf8" LC_MESSAGES="de_DE.utf8" LC_PAPER="de_DE.utf8" LC_NAME="de_DE.utf8" LC_ADDRESS="de_DE.utf8" LC_TELEPHONE="de_DE.utf8" LC_MEASUREMENT="de_DE.utf8" LC_IDENTIFICATION="de_DE.utf8" LC_ALL=de_DE.utf8 When not setting LC_ALL: $ LANG=de_DE.utf8 LC_COLLATE=C locale LANG=de_DE.utf8 LC_CTYPE="de_DE.utf8" LC_NUMERIC="de_DE.utf8" LC_TIME="de_DE.utf8" LC_COLLATE=C LC_MONETARY="de_DE.utf8" LC_MESSAGES="de_DE.utf8" LC_PAPER="de_DE.utf8" LC_NAME="de_DE.utf8" LC_ADDRESS="de_DE.utf8" LC_TELEPHONE="de_DE.utf8" LC_MEASUREMENT="de_DE.utf8" LC_IDENTIFICATION="de_DE.utf8" LC_ALL= In scripts I normally use LC_ALL=C sort. Regards Matthias