using sort and uniq in bash
I have this file with the first lines as follows:
say the file is named file1.txt
After i do the following:
sort file1.txt | uniq >> file2.txt
I expect that letter a would only appear once, not in two rows, word about would also appear only once. However, I can't seem to get that result using this. I also tried the sort -f file1.txt | uniq >> file2.txt but to no avail. I actually got file1.txt from a messier file using the -f option in sort command. Any help would be greatly appreciated.