In linux, I can grep a string from a file using grep mySearchString myFile.txt.
How can I only get the result which are unique?
Tell me more
×
Super User is a question and answer site for
computer enthusiasts and power users. It's 100% free, no registration required.
|
|
||||
|
|
|
You can achieve this with the example: [john@awesome ~]$ echo -e "test\ntest\ntest\nanother test\ntest" test test test another test test [john@awesome ~]$ echo -e "test\ntest\ntest\nanother test\ntest" | sort | uniq another test test depending on the data you may want to utilize some of the switches as well. |
|||||||||||||
|