linux - Percentage value with GNU Diff -


what method using diff show percentage difference between 2 files?

such if file has 100 lines , copy has 15 lines have been changed diff-percent 15%.

something perhaps?

two files, a1 , a2.

$ sdiff -b -b -s a1 a2 | wc give how many lines differed. wc gives total, divide.

the -b , -b ignore blanks , blank lines, , -s says suppress common lines.


Comments

Popular posts from this blog

javascript - Enclosure Memory Copies -

php - Replacing tags in braces, even nested tags, with regex -