Diff two address lists?

Patton p.echols at comcast.net
Sat Jul 28 07:45:53 UTC 2012


On 07/27/2012 08:11 PM, William Scott Lockwood III wrote:
>
> On Jul 27, 2012 10:09 PM, "Patton" <p.echols at comcast.net 
> <mailto:p.echols at comcast.net>> wrote:
> >
> > I have a need to compare two lists of email addresses.  Each one is 
> a text file with address per line.  What I need to output is a list of 
> email addresses that are only in list B, I do not want the addresses 
> that are in both or are only in A.
> >
> > I've read man diff, and it looks like I should be able to do it, but 
> I cannot figure out how to do it and clearly do not understand some of 
> how it should work.
> >
> > I am not married to using diff, anything that will get the result 
> will be great.  Any thoughts??
> >
> >
> > --
> > Patton
>
> I would run both files through sort, which will ensure the order is 
> the same in both files, and then diff -u them both.
>
>
>
the -u parameter seems to say it will output lines of "unified 
context."  Not sure I know how that will help.

-- 
Patton





More information about the ubuntu-users mailing list