Is there a mac file comparison tool that can detect duplicates within a file? This is very close to what I’m looking for except it is for Windows: http://www.rlvision.com/dupli/about.asp. Also, I need to compare duplicate content across two files. If nothing else, I can just append file2 content to the bottom of file1.
Share
I don’t know of a GUI app to do it, but it’s fairly easy at the terminal:
cat file1.txt file2.txt | sort | uniq -dThe
-dwill make it show only duplicate lines. If you just want the output without duplicates, just leave off the-d.