Path: utzoo!attcan!uunet!mcvax!dik From: dik@cwi.nl (Dik T. Winter) Newsgroups: comp.unix.questions Subject: Re: Unix shell prgrams and AI techniques Message-ID: <7567@boring.cwi.nl> Date: 22 Jun 88 11:56:43 GMT References: <7387@watdragon.waterloo.edu> <514@philmds.UUCP> Distribution: comp Organization: CWI, Amsterdam Lines: 21 In article <514@philmds.UUCP> leo@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)? > The output is according the man page for sort on BSD 4.3. A +pos argument takes the form +m.n where m denotes a field number and n denotes a character within a field. So you ask sorting by the 15th field, there are not so many fields so all lines are equal, and -u looks at the key only. -- dik t. winter, cwi, amsterdam, nederland INTERNET : dik@cwi.nl BITNET/EARN: dik@mcvax