From owner-freebsd-questions@FreeBSD.ORG Tue Dec 16 13:24:41 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E60B616A4CF for ; Tue, 16 Dec 2003 13:24:41 -0800 (PST) Received: from catseye.mine.nu (d207-81-17-215.bchsia.telus.net [207.81.17.215]) by mx1.FreeBSD.org (Postfix) with SMTP id E048B43D45 for ; Tue, 16 Dec 2003 13:24:40 -0800 (PST) (envelope-from catseye@catseye.mine.nu) Received: (qmail 25906 invoked by uid 1001); 16 Dec 2003 21:25:52 -0000 Date: Tue, 16 Dec 2003 13:25:52 -0800 From: Chris Pressey To: mrb@bmyster.com Message-Id: <20031216132552.75b0c4a9.cpressey@catseye.mine.nu> In-Reply-To: <1191.66.63.97.2.1071610282.squirrel@new.host.name> References: <1191.66.63.97.2.1071610282.squirrel@new.host.name> Organization: Cat's Eye Technologies X-Mailer: Sylpheed version 0.9.8a (GTK+ 1.2.10; i386-portbld-freebsd4.9) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit cc: freebsd-questions@freebsd.org Subject: Re: comparison of files X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Dec 2003 21:24:42 -0000 On Tue, 16 Dec 2003 16:31:22 -0500 (EST) "Brent Bailey" wrote: > hello, > > 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 offenders. > > 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 ? Are file1 and file2 sorted? -Chris