Unix shell prgrams and AI techniques
Richard A. O'Keefe
ok at quintus.uucp
Wed Jun 22 13:46:44 AEST 1988
In article <514 at philmds.UUCP> leo at philmds.UUCP (L.J.M. de Wit) writes:
:B.T.W. Testing this script I discovered what seems to be a bug in sort
:(Ultrix 2.0).
:The following two lines when fed into sort -u +15:
: Mon Jun 20 19:36 still logged inuucp ttyic
: Mon Jun 20 18:07 still logged inleo ttyid
:generate only one line:
: Mon Jun 20 19:36 still logged inuucp ttyic
:The manual says: A missing -num argument means the end of the line,
:and for u: Suppress all but one in each set of equal lines. Ignored bytes
:and bytes outside keys do not participate in the comparision.
:Am I wrong or is the manual wrong (or is sort buggy)?
Trying "sort -u +15" with just these two records on a Sun-3/50 running
SunOS 3.2, I get as output whichever of the two records came first.
There are said to be problems with the -u option of sort, so I always
avoid it. "sort +15 | uniq" works fine.
More information about the Comp.unix.questions
mailing list