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

Revision: 1.1/1.1, last modified on 2007-07-31 @ 18:56.

Karma: 49 (66.01% out of 153 were positive) [+/-]

You can subscribe to RSS 2.0 feed for comments and trackbacks

Trackbacks:
There are currently no trackbacks for this item.
Use this TrackBack url to ping this item (right-click, copy link target). If your blog does not support Trackbacks you can manually add your trackback by using this form.

No comments yet

Add Comment

 

May the Force be with you. RAmen