On Mon, Mar 23, 2020 at 09:41:16AM -0600, Todd C. Miller wrote: > GNU sort on Linux behaves the same as the OpenBSD sort when run in > the C locale. > > $ LANG=C sort -c -d -f input.txt > sort: input.txt:2: disorder: -AAAA > > $ LANG=C sort -c -d -i input.txt > sort: input.txt:2: disorder: -AAAA > > Since our C library doesn't really support other locales I think > this is the expected behavior. > > - todd
It didn't occur to me to try this with the C locale. For what it's worth I asked on the coreutils list, where it's been suggested that the top-level sort could be dropped for locales that define a total ordering of all characters, which (I think) would include the C locale.[1] Thanks, Richard [1]: https://www.mail-archive.com/bug-coreutils@gnu.org/msg31342.html