Diff two address lists?

William Scott Lockwood III vladinator at gmail.com
Sat Jul 28 03:11:19 UTC 2012


On Jul 27, 2012 10:09 PM, "Patton" <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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20120727/19334b79/attachment.html>


More information about the ubuntu-users mailing list