[NTLUG:Discuss] Filtering a list with a list

Kevin Lee klee24 at gmail.com
Fri Mar 6 21:46:07 CST 2009


For reasonably sized files I'd use a simple bash script.

-------------------------
#!/bin/bash
cp ./source.list ./filtered.list
for address in $(cat ./exclude.list);do
    grep -v $address ./filtered.list > filtered.list.$$
    mv filtered.list.$$ filtered.list
done


On Fri, Mar 6, 2009 at 8:51 PM, Daniel Hauck <daniel at yacg.com> wrote:

> These are plain text flat files.
>
> Ralph Green さんは書きました:
> > Howdy,
> >   Assuming these entries are in a SQL database,
> >   Select email_id from source.email_id
> >  where email_id not in select email_id from exclusion.email_id email_id
> >
> > If that does not answer your question, could you add more information.
> > Is your data in two text files, python dictionaries, or what?
> > Good luck,
> > Ralph
> >
> > On Fri, 2009-03-06 at 19:36 -0600, Daniel Hauck wrote:
> >> I have a process that generates a list of valid email addresses for a
> >> system.  I would like to be able to filter that list by removing all
> >
> >> So the question is, what tool(s) do I use to do this?  I'm guessing
> >> there is a simple way to do it. I just don't know what it is.
>
>
> _______________________________________________
> http://www.ntlug.org/mailman/listinfo/discuss
>


More information about the Discuss mailing list