Date: Fri, 9 Jan 2004 15:48:28 +0000 From: Matthew Seaman <m.seaman@infracaninophile.co.uk> To: "Jack L. Stone" <jacks@sage-american.com> Cc: freebsd-questions@freebsd.org Subject: Re: Scripting help Message-ID: <20040109154828.GA23424@happy-idiot-talk.infracaninophile.co.uk> In-Reply-To: <3.0.5.32.20040109091937.014b2378@10.0.0.15> References: <3.0.5.32.20040109091937.014b2378@10.0.0.15>
next in thread | previous in thread | raw e-mail | index | archive | help
--1yeeQ81UyVL57Vl7 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jan 09, 2004 at 09:19:37AM -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. >=20 > 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 tedio= us > to try and keep the lists up to date (groan). >=20 > 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, th= en > delete from the main lists (also one address per line). >=20 > I'd appreciate suggestions on how to do this. comm(1) is what you need. Try: % sort mailing-list > mailing-list.sorted % sort bounce-addresses > bounce-addresses.sorted % comm -23 mailing-list.sorted bounce-addresses.sorted > mailing-list =20 Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks Savill Way PGP: http://www.infracaninophile.co.uk/pgpkey Marlow Tel: +44 1628 476614 Bucks., SL7 1TH UK --1yeeQ81UyVL57Vl7 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQE//s1MdtESqEQa7a0RAsYiAKCT1tuCVgDm+3il0WThW6koCPyrDwCfZrKM glFXvz6AgdOQqyfoqCR0940= =MkEy -----END PGP SIGNATURE----- --1yeeQ81UyVL57Vl7--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040109154828.GA23424>