I don't want to sort my file, just filter out duplicate lines, maintaining the original ordering.  Is there a way to use sort's unique function without it's sort function (something like cat -u would give if it existed)? Just using uniq without sort does nothing worthwhile, because uniq only looks at adjacent lines, so a file has to be sorted first.Also, incidentally, what in hell is the difference between uniq and uniq --unique?  Here are commands on a random file from pastebin:wget -qO - http://pastebin.com/0cSPs9LR | wc -l350wget -qO - http://pastebin.com/0cSPs9LR | sort -u | wc -l287wget -qO - http://pastebin.com/0cSPs9LR | sort | uniq | wc -l287wget -qO - http://pastebin.com/0cSPs9LR | sort | uniq -u | wc -l258In summary:How do I filter duplicates greedily without sorting?How is uniq not unique enough that there is also uniq --unique?p.s.  This question looks like a duplicate of the following q's, but it isn't:https://stackoverflow.com/questions/22287871/what-is-the-difference-between-sort-u-and-uniqhttps://stackoverflow.com/questions/3382936/sort-uniq-in-linux-shellWhat is the difference between sort -u and sort | uniq?
Sort -u without sorting but with better uniqueness?
bash;sort;uniq