Don’t get me wrong, I appreciate the utility of diff. I use diff all the time. Unfortunately, there are times when I don’t want a diff output.
Case in point: I was comparing two lists of accounts. I wanted the accounts that were present in the newer file. Diff gave me output, but the diff output wasn’t what I wanted.
comm is handy for this. You would do the following to get the list I want:
comm -1 -3 oldfile newfile
Lovely! comm is actually part of the GNU Core Utilities and was written by Richard Stallman and David MacKenzie. That confirmed my suspicions that comm subscribed to an old UNIX adage for some utilities: Do one thing very, very well.
I have nothing more to say about comm, you’ll have to wear it out yourself.
Until next time,
-LightningCrash