comm
prompts that sorted text is not sorted and sort
gives wrong results. For example,
printf 'G.EC\nGE.BO\nGE.DA\n' | sort
outputs
GE.BOAB
G.ECH
GE.DAG
Other example is the output of ls
,
STATIONS_1800
stations.1800.txt
STATIONS.50d
STATIONS.D01
STATIONS.D16
stations.e2008.txt
which should be
STATIONS_1800
STATIONS.50d
STATIONS.D01
STATIONS.D16
stations.1800.txt
stations.e2008.txt
The output of env | grep 'LC\|LANG'
is
LANGUAGE=en_GB.UTF-8
LC_ADDRESS=en_GB.UTF-8
LC_NAME=en_GB.UTF-8
LC_MONETARY=en_GB.UTF-8
LC_PAPER=en_GB.UTF-8
LANG=en_GB.UTF-8
LC_IDENTIFICATION=en_GB.UTF-8
LC_TELEPHONE=en_GB.UTF-8
LC_MEASUREMENT=en_GB.UTF-8
LC_TIME=en_GB.UTF-8
LC_COLLATE=en_GB.UTF-8
LC_NUMERIC=en_GB.UTF-8
On another machine with the same LC*
and LANG*
, the sorting works perfect.