Diff is a great tool to display the changes between two files. But how to display the similarities of two text files (while ignoring the differences)?
I.e. sample input:
a:
Foo Bar
X
Hello
World
42
b:
Foo Baz
Hello
World
23
Pseudo output (something like this):
@@ 2,3
=Hello World
Just sorting both files and using comm is not enough, because in that case the line information is lost.