From owner-freebsd-questions@FreeBSD.ORG Fri Jan 9 07:29:53 2004 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 582FA16A4CE for ; Fri, 9 Jan 2004 07:29:53 -0800 (PST) Received: from mail.rtl.org (rtl-3.i2k.com [63.94.12.207]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1F7CE43D2D for ; Fri, 9 Jan 2004 07:29:49 -0800 (PST) (envelope-from jstewart@rtl.org) Received: from mis3c.rtl.lan (rtl-2.i2k.com [63.94.12.206]) by mail.rtl.org (Postfix) with ESMTP id D3F5A30AAE; Fri, 9 Jan 2004 10:28:31 -0500 (EST) Received: by mis3c.rtl.lan (Postfix, from userid 500) id 5EC074FD1; Fri, 9 Jan 2004 10:27:11 -0500 (EST) Date: Fri, 9 Jan 2004 10:27:11 -0500 From: Jason Stewart To: "Jack L. Stone" Message-ID: <20040109152711.GB14358@rtl.org> Mail-Followup-To: "Jack L. Stone" , freebsd-questions@freebsd.org References: <3.0.5.32.20040109091937.014b2378@10.0.0.15> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3.0.5.32.20040109091937.014b2378@10.0.0.15> User-Agent: Mutt/1.4.1i cc: freebsd-questions@freebsd.org Subject: Re: Scripting help 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: Fri, 09 Jan 2004 15:29:53 -0000 On 09/01/04 09:19 -0600, Jack L. Stone wrote: > Dear list: > I hope think this is not off-topic, and is just about running a script in > FBSD to delete specific lines in a flat file based on info in another flat > file. > > My scripting skills are very limited and need help on how to purge my mail > lists. We maintain several majordomo mail lists on a Tech magazine site > (www.antennex.com) with 60,000 readers. Needless to say, it is real tedious > to try and keep the lists up to date (groan). > > I have scripted a way to capture the bounces (by list) into a plain text > file (1 address per line), but haven't figured out how to purge those from > the lists. In other words, if the address is found in the bounce list, then > delete from the main lists (also one address per line). > > I'd appreciate suggestions on how to do this. One way to to it would be to use grep(1). grep -i -v -f > The resulting outfile will have no instances of the delete list Thats one way to do it. Good Luck, Jason