Date: Fri, 9 Jan 2004 10:27:11 -0500 From: Jason Stewart <jstewart@rtl.org> To: "Jack L. Stone" <jacks@sage-american.com> Cc: freebsd-questions@freebsd.org Subject: Re: Scripting help Message-ID: <20040109152711.GB14358@rtl.org> 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
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 <file of deletes> <master list> > <outfile> The resulting outfile will have no instances of the delete list Thats one way to do it. Good Luck, Jason
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040109152711.GB14358>