Reputation: 14660
I am using Emacs on a GNU/Linux system. I am trying to compare two data files containing columns of numbers which are almost similar in content. Is there an Emacs/Unix utility to highlight the differences between these text files?
Upvotes: 5
Views: 3849
Reputation: 143047
In emacs, if you pull both files into different buffers, you can use the M-x ediff-buffers
command to display the differences. Emacs will nicely highlight the differences and allow you to scroll through the buffers concurrently. See tip #5 on this "Ten Essential Emacs tips" page, or the GNU docs on Ediff.
Under Unix there's the diff
command. Here's a short example of using diff, and one more example
I usually prefer comparing with Emacs, more visual, though of course both files will need to fit into buffers.
Upvotes: 8