No I am not talking about OCD pet owners.
Let’s say you have many files that contain data that you want to merge into a single file (like several bookmark files containing web links), but you want every line in the new file to be unique.
As usual Linux (Unix) can do it in one line:
cat file1 file2 … | sort -u > combined_file
1) “cat” of course concatenates files together.
2) “sort -u” sorts the lines in the new big file and enforces uniqueness of lines.
3) Then a simple redirect sends the finished product to a new file