in reply to
Comparing the contents of two files
There's a standard POSIX utility that does that:
comm
. It assumes your files are sorted (but if not, that's easy to do). In bash, you can write:
comm <(sort file1) <(sort file2)
[download]
and it prints three columns, one with lines only in file1, one with lines only in file2, and one with lines in both files.
Comment on
Re: Comparing the contents of two files
Download
Code
In Section
Seekers of Perl Wisdom