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?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In emacs, if you pull both files into different buffers, you can use the
M-x ediff-bufferscommand 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
diffcommand. Here’s a short example of using diff, and one more exampleI usually prefer comparing with Emacs, more visual, though of course both files will need to fit into buffers.