GNU bug report logs - #61248
uniq --unique needs examples

Previous Next

Package: coreutils;

Reported by: Dan Jacobson <jidanni <at> jidanni.org>

Date: Fri, 3 Feb 2023 07:14:02 UTC

Severity: normal

Full log


View this message in rfc822 format

From: Bernhard Voelker <mail <at> bernhard-voelker.de>
To: Dan Jacobson <jidanni <at> jidanni.org>, 61248 <at> debbugs.gnu.org
Subject: bug#61248: uniq --unique needs examples
Date: Fri, 10 Feb 2023 23:20:02 +0100
On 2/3/23 08:12, Dan Jacobson wrote:
> uniq INFO page says:
> ‘-u’
> ‘--unique’
>       Discard the last line that would be output for a repeated input
>       group.  When used by itself, this option causes ‘uniq’ to print
>       unique lines, and nothing else.
> 
> This really needs some examples, to help people understand what it means.

While an example is always nice, isn't the last part of the above exactly
telling what it's doing?

  $ printf '%s\n' a a a b c c | uniq -u
  b

Admittedly, the --help output is both much shorter and clearer:

    -u, --unique          only print unique lines

Have a nice day,
Berny




This bug report was last modified 2 years and 190 days ago.

Previous Next


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