Hi Frank,
I just created a quick test file and sort -u didn't quite work for me (technically it should do what you are asking) but then I realised that I had invisible spaces after some of the words and so they were not deemed uniquely different by the system. Perhaps you are having the same issue. However, I found that the following seems to work - I think it pushes the "spacebar" space into a new line creating unique words minus the space formatting:
cat words.txt | tr " " "\n" | sort -u
Regards,
Tahir
On Sun, Feb 16, 2014 at 4:17 PM, Robert P. J. Day <rpjday@xxxxxxxxxxxxxx> wrote:
On Sun, 16 Feb 2014, Frank Murphy wrote:sort -u?
> 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.
rday
--
========================================================================
Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca
Twitter: http://twitter.com/rpjday
LinkedIn: http://ca.linkedin.com/in/rpjday
========================================================================
--
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org
-- users mailing list users@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org