Subject: bug#61248: uniq --unique needs examples

From: Bernhard Voelker <[email-masked]>
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