GNU bug report logs - #18073
defect with sort multiple arguments

Previous Next

Package: coreutils;

Reported by: n buckner <bucknerns <at> gmail.com>

Date: Mon, 21 Jul 2014 20:52:04 UTC

Severity: normal

Tags: notabug

Done: Eric Blake <eblake <at> redhat.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eric Blake <eblake <at> redhat.com>
To: n buckner <bucknerns <at> gmail.com>, 18073 <at> debbugs.gnu.org
Subject: bug#18073: defect with sort multiple arguments
Date: Tue, 22 Jul 2014 10:44:40 -0600
[Message part 1 (text/plain, inline)]
[re-adding the bug, with permission]

On 07/22/2014 10:14 AM, n buckner wrote:
> Sorry didn't see this at the bottom of the manpage. info coreutils 'sort
> invocation'
> 
> The manpage is kind of misleading because it does not convey that at all.
> 
>        -n, --numeric-sort
>               compare according to string numerical value
> 
>        -u, --unique
>               with -c, check for strict ordering; without -c, output only
> the first of an equal run
> 
> 

If you think we can improve the documentation, to make it more obvious
that -u only covers uniqueness between keys, and that -n stops a key at
the first non-numeric character, suggestions are welcome.  Remember that
the man page is generated from the --help text, and that those are
supposed to be consise; but the info page should definitely go into more
detail.  And in fact, I see this in the info page:

     The commands 'sort -u' and 'sort | uniq' are equivalent, but this
     equivalence does not extend to arbitrary 'sort' options.  For
     example, 'sort -n -u' inspects only the value of the initial
     numeric string when checking for uniqueness, whereas 'sort -n |
     uniq' inspects the entire line.  *Note uniq invocation::.

which is _exactly_ what you filed this bug report about.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

[signature.asc (application/pgp-signature, attachment)]

This bug report was last modified 10 years and 305 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.