[NTLUG:Discuss] Filtering a list with a list

Daniel Hauck daniel at yacg.com
Fri Mar 6 22:53:05 CST 2009


Chris Cox さんは書きました:
> 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
>> entries that appear in an exclusion list.
>>
> 
> grep has a file option for patterns.
> grep -v -f filter.txt list.txt
> user1 at domain.com
> user2 at domain.com
> user3 at domain.com
> user4 at domain.com
> 
> Assuming list.txt has the whole list and
> filter.txt has the exclusion list.
> 
That is the perfect answer.  Thanks!




More information about the Discuss mailing list