Remove Duplicates in Text File

So I have a list of names, but the names are duplicated down the page. Each name is on a new line by itself.

If I want to remove all the duplicates and just find out who is included in the file, I can simply do:

[pastacode lang=”bash” manual=”awk%20′!seen%5B%240%5D%2B%2B’%20filename” message=”” highlight=”” provider=”manual”/]

This will remove duplicates and print them to your terminal.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.