Python Forum
program wanted: diff that ignores numbers - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Forum & Off Topic (https://python-forum.io/forum-23.html)
+--- Forum: Bar (https://python-forum.io/forum-27.html)
+--- Thread: program wanted: diff that ignores numbers (/thread-10978.html)



program wanted: diff that ignores numbers - Skaperen - Jun-16-2018

i often need to see diffs of "log files" which are full of differences that are just differences of numbers that i usually don't care about. i have dealt with this in a lot of cases by changing digits to a common character such as by doing tr 123456789 000000000 to make new files to actually be compared. but there is still the problem of numbers of differing length (number of digits). so what i would like to have is a special diff program that would treat different numbers as being the same. my usual focus is to find inserted or deleted lines among many that have numbers in the same places with different values, such as dates.