Duplicate words | uniq\sort?

Robert P. J. Day rpjday at crashcourse.ca
Sun Feb 16 16:17:50 UTC 2014


On Sun, 16 Feb 2014, Frank Murphy wrote:

> I have 554 words in the following file one word per line.
> Some words are repeated up to 3 times.
>
> words.list
>
> If I try "cat words.list | uniq -u"
> It dumps all repeated words, I need one copy of all words.
>
> uniq words.list > uniq.list
> Words are still duplicated.
>
> sort words.list | uniq
> leaves about 20 words total
> which I feel is wrong as
> cat words.list | uniq -c
> shows about 100 non-dupe words
>
> Haven't much success with sort either.

  sort -u?

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================


More information about the users mailing list