Bug in sort(1) when using +m.n -o.p and -tc

Doug Gwyn gwyn at smoke.brl.mil
Sat Apr 13 06:42:47 AEST 1991


In article <1991Apr11.031926.19901 at cs.uow.edu.au> david at cs.uow.edu.au (David E A Wilson) writes:
>I have run into a bug in the sort(1) command on a Sun4 running SunOS 4.1.1.

No, it's just a feature.

>/usr/5bin/sort -t: +1.1 -1.2 +1.0 -1.1 <<!

That should have been
	sort -t: +1.1 -1.3 +1.0 -1.2
as documented and shown in an example in the SVR2 manual entry SORT(1).

This is admittedly a strange design that is hard to use correctly.
My guess is that it may have actually been meant to work differently
when it was first implemented, but now that the "sort" utility is in
wide use the specifications cannot be changed without breaking many
applications.



More information about the Comp.bugs.4bsd.ucb-fixes mailing list