[SH] how to count different line using diff or cmp
I try to count the number of different lines between two files using diff or cmp.
diff file1 file2 | wc -l
But the result is total lines compared.
How to count just the different lines?
e.g.
file1 file2
a a
b b
c e
d f
the result should be 2.
Any help?
many thanks.