Trung Minh
New member
How do I find duplicate lines in two files?
Answer
From the unix terminal, we can use
diff file1 file2
to find the difference between two files. Is there a similar command to show the similarity across 2 files? (many pipes allowed if necessary. Each file contains a line with a string sentence; they are sorted and duplicate lines removed with sort file1 | uniq .
Answer
From the unix terminal, we can use
diff file1 file2
to find the difference between two files. Is there a similar command to show the similarity across 2 files? (many pipes allowed if necessary. Each file contains a line with a string sentence; they are sorted and duplicate lines removed with sort file1 | uniq .