How to count differences between two files on linux?

Posted by Zsolt Botykai on Stack Overflow See other posts from Stack Overflow or by Zsolt Botykai
Published on 2009-10-14T14:06:21Z Indexed on 2010/03/19 19:01 UTC
Read the original article Hit count: 577

Filed under:
|
|
|
|

Hi all,

I need to work with large files and must find differences between two. And I don't need the different bits, but the number of differences.

For the differ rows I come up with

diff --suppress-common-lines --speed-large-files -y File1 File2 | wc -l

And it works, but is there a better way to do it?

And how to count the exact number of differences (with standard tools like bash, diff, awk, sed some old version of perl)?

Thanks in advance

© Stack Overflow or respective owner

Related posts about diff

Related posts about differences