I have a file called "1.txt" which contains the following:
111
111
222
777
1111
777
I'm trying to delete duplicate strings from it. Both sort -u 1.txt and sort 1.txt | uniq return this:
111
1111
222
777
777
Question:
Why is the string "777" still contained twice? How to remove the duplicate?
LC_ALL=C cat -vet 1.txt-- that will show normally-invisible and non-ASCII characters in visible format, including showing newlines (line endings) as "$". I bet this will show a difference between the two "777" lines.