Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is there a tool for comparing two lines of text?

All the tools I have compare on a line level, when I really need a character level diff in the line.

Windows or *nix, GUI or command line, I don't care.

share|improve this question
1  
See superuser.com/questions/43270/file-compare-recommendation most apps highlight differences within a line too. –  ChrisF May 25 '10 at 21:14
    
@ChrisF I'm already using WinMerge, and it does ... ok, but not exactly what I'm looking for. –  C. Ross May 27 '10 at 0:14
add comment

4 Answers

up vote 2 down vote accepted

I use vimdiff often to compare two files side by side. vimdiff in color mode will highlight all differences between corresponding lines on each side. I'm using it to look for different characters on two different lines (in different files) right now.

share|improve this answer
add comment

kdiff is one open source diff utility that shows character by character differences as well as line by line. I'm sure there are others. Here's link for kdiff: http://kdiff3.sourceforge.net/

share|improve this answer
    
+1 I love this program (to be fair, I haven't really tried anything else for comparison) –  David Z May 26 '10 at 2:35
add comment

DiffMerge does pretty good at highlighting word or character differences. Better than WinMerge, IME.

share|improve this answer
add comment

Use this perl script from the git project.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.