Looking for recommendation on how to proceed.
Glenn Steen
glenn.steen at gmail.com
Sun Aug 27 22:25:46 IST 2006
On 27/08/06, Chris Hammond <chris at tac.esi.net> wrote:
> I am trying to find the easiest way to compare two text files containing domain names and tell me which domain names in the second file do not exist in the first. It seems like it should be a simple process but having no useful scripting knowledge, I am hoping someone can point me to something that already exists.
>
> Thanks
> Chris
>
Provided you have them 1 domain/line in the two files, it is very very simple:
total differences (you cat in file1 twice, so that it'll only be the
ones from file2 that pass out from "uniq":
cat file1 file1 file2 | sort | uniq -u
If you don't like that method, well... diff is our friend then:-):
diff file1 file2 | egrep "^>"
... should do too:-).
--
-- Glenn
email: glenn < dot > steen < at > gmail < dot > com
work: glenn < dot > steen < at > ap1 < dot > se
More information about the MailScanner
mailing list