I am getting two different results for the following commands. Want to know the difference between those commands. I want to list unique lines (remove duplicates)in a file. To sort it out, I used following commands.
sort -u filename
and
sort filename|uniq -u
I got two different results. Can someone explain the difference.
Also tried this command. Got another set of new results apart from the above two.
cat filename|uniq -u.