[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: I would like to make a suggestion for the diff command.
From: |
Bob Proulx |
Subject: |
Re: I would like to make a suggestion for the diff command. |
Date: |
Tue, 5 Aug 2014 11:58:27 -0600 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
Jeff Silverman wrote:
> I have a command which comes in two variants. The command outputs a single
> line that is a couple of thousand characters long. The diff command
> correctly outputs that the two lines are different, but I would like to
> know which characters within the line are different.
Check out the wdiff program. It will do what you want.
https://www.gnu.org/software/wdiff/
bash$ wdiff <(echo one two three) <(echo one too three)
one [-two-] {+too+} three
Also see the -t option for terminal highlighting.
Also note that the diffutils have a dedicated mailing list. You can
reach the diffutils developers directly at the address@hidden
address. Here is the web page with more information.
https://www.gnu.org/software/diffutils/
> I would like you to add a --color switch to make diff output the characters
> that are different in different colors, say red for deletions and green for
> additions. The diff command would have to sense the terminal type to see
> if it is color capable.
Also check out the "colordiff" program.
http://www.colordiff.org/
Bob