La Vita è Bella

Wednesday, August 01, 2007

The reversed diff

We use diff to find out the different lines in 2 files, but sometimes we also need to find out the same lines in 2 files. So we need the "reversed diff"

And this command can be used as the reversed diff:

cat file1 file2 | sort | uniq -d

tags: , , , ,

17:55:56 by fishy - linux - Permanent Link

no comments yet - no trackbacks yet - karma: 57 [+/-]

May the Force be with you. RAmen