Brent Bailey wrote:


I have been trying to write a shell script that will compare 2 files and
generate a 3rd.

i have a list of abusive IP's generated by our router. I want to compare
it against a list of known abuse IPs ..and have it create a file of repeat

ive tired to use "comm" to compare file1 against file2 doing something like

comm -12i file1 file2 >file3

however it doesnt seem to work....any suggestions ?

thank you for all your help in advance

You need to sort the files first...see below for difference in comm behavior...

Script started on Tue Dec 16 20:27:59 2003
freeb# cat blacklist1
freeb# cat blacklist2
freeb# comm -i12 blacklist1 blacklist2
freeb# sort blacklist1 > blacklist1_sorted
freeb# sort blacklist2 > blacklist2_sorted
freeb# comm -i12 blacklist1_sorted blacklist2_sorted

Script done on Tue Dec 16 20:29:14 2003


_______________________________________________ [EMAIL PROTECTED] mailing list To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to