Considering the sort key: a, a01 and a02, if there’s no trailing fields, the sort result looks like:
$ cat test1
a01
a
a02
$ sort test1
a
a01
a02
$
But if there are tailing fields, something goes strange:
$ cat test2
a01 7
a 12
a02 42
$ sort test2
a01 7
a02 42
a 12
$
Why does the key “a” fall from the top to the bottom of the sort result?
My sort version is “sort (GNU coreutils) 5.97”.
The man page for my version of
sortsays:And indeed, if I set
LC_ALL=Cand runsorton your second example, I get:Your default locate is probably something other than
C.