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

To reply to this bug, email your comments to 61248 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-coreutils <at> gnu.org:
bug#61248; Package coreutils. (Fri, 03 Feb 2023 07:14:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Dan Jacobson <jidanni <at> jidanni.org>:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Fri, 03 Feb 2023 07:14:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Dan Jacobson <jidanni <at> jidanni.org>
To: bug-coreutils <at> gnu.org
Subject: uniq --unique needs examples
Date: Fri, 03 Feb 2023 15:12:58 +0800
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.




Information forwarded to bug-coreutils <at> gnu.org:
bug#61248; Package coreutils. (Fri, 10 Feb 2023 22:21:02 GMT) Full text and rfc822 format available.

Message #8 received at 61248 <at> debbugs.gnu.org (full text, mbox):

From: Bernhard Voelker <mail <at> bernhard-voelker.de>
To: Dan Jacobson <jidanni <at> jidanni.org>, 61248 <at> debbugs.gnu.org
Subject: Re: 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




Information forwarded to bug-coreutils <at> gnu.org:
bug#61248; Package coreutils. (Sat, 11 Feb 2023 01:07:01 GMT) Full text and rfc822 format available.

Message #11 received at 61248 <at> debbugs.gnu.org (full text, mbox):

From: Dan Jacobson <jidanni <at> jidanni.org>
To: Bernhard Voelker <mail <at> bernhard-voelker.de>
Cc: 61248 <at> debbugs.gnu.org
Subject: Re: bug#61248: uniq --unique needs examples
Date: Sat, 11 Feb 2023 09:06:15 +0800
BV> While an example is always nice, isn't the last part of the above
BV> exactly telling what it's doing?

That is for experts to know. The rest of us need examples,
sort of like your idea, (please modify):

$ echo a a a b c c b b d b | xargs --max-args=1 | uniq --unique
b
d
b




This bug report was last modified 1 year and 286 days ago.

Previous Next


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