2021-07-02 14:07:17 +0200, Joerg Schilling via austin-group-l at The Open Group: > "Stephane Chazelas via austin-group-l at The Open Group" > <[email protected]> wrote: > > > Is: > > > > printf '%s\n' a,b a,a | sort -c -t, -k1,1 > > > > Meant to succeed or not? > > > > It fails in GNU, busybox, OpenBSD, FreeBSD, Solaris, though with a > > confusing: > > > > sort: -:2: disorder: a,a > > Try to use the POSIX sort variant to avoid the message. [...]
I suppose you mean the -C option, which still checks but doesn't output a diagnostics message. btw, it seems to me -C should be referenced in the EXIT STATUS section and in the -u description like for -c. But the question here also stands for -C: should sort return success or failure when a file is sorted according to the key specification but not as per the last resort sort, and should -s be added to the specification. I'm personally happy with Geoff's answer on those. -- Stephane
