Automating the comparison of text files

(Helen) #1

I have a set of log files (.txt) that I want to compare to new log files (they should be pretty much the same but there may be some differences that are OK and can be ignored). Currently I am producing the new log files then using the Compare PlugIn on Notepad++ and scrolling through to check the differences. Please can anyone suggest how this might be automated so only the differences I care about are highlighted and reported to me.

(Burdette) #2

In Ruby, I use gem diff-lcs. Check the documentation.

For other languages, try web-search for “diff lcs <your_language>”.