Automating the comparison of text files

Unix itself has a diff command: https://www.networkworld.com/article/2696092/operating-systems/unix---having-fun-with-diff.html

And, naturally, you can chain the output into other Unix commands and do all kind of magic.