12

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.

2

4 Answers 4

7

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.

5

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/

1
  • +1 I love this program (to be fair, I haven't really tried anything else for comparison)
    – David Z
    May 26, 2010 at 2:35
1

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

0

Use this perl script from the git project.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .