On 21Nov2018 21:47, Amadeus W.M. <amadeus84(a)verizon.net> wrote:
I've been using sort for years and I just ran into something
I've never
seen and I can't explain.
[...]
I see some weirdness too, but mine doesn't match yours. (Ubuntu 16.04
here, though.)
I note that sort(1) says:
*** WARNING *** The locale specified by the environment affects
sort order. Set LC_ALL=C to get the traditional sort order that uses
native byte values.
So do some testing with:
cat spam | LC_ALL=C sort -k1 -t"|"
and report.
Cheers,
Cameron Simpson <cs(a)cskk.id.au>