ghalkes:~# command line tools

dwdiff

About dwdiff

dwdiff is a front-end for the diff program that operates at the word level instead of the line level. It is different from wdiff in that it allows the user to specify what should be considered whitespace, and in that it takes an optional list of characters that should be considered delimiters. Delimiters are single characters that are treated as if they are words, even when there is no whitespace separating them from preceding words or delimiters. dwdiff is mostly commandline compatible with wdiff. Only the --autopager, --terminal and --avoid-wraps options are not supported.

The default output from dwdiff is the new text, with the deleted and inserted parts annotated with markers. Command line options are available to change both what is printed, and the markers.

News

dwdiff version 1.7 released

This release adds a program called dwfilter which reformats the old input such that visual diff programs (such as meld and kdiff3) can be used to show differences with reasonable results.

13-02-2010

dwdiff version 1.6.1 released

This release fixes a bug in the new paragraph separator feature and an unfortunate interaction with CR/NL line endings and color mode.

12-10-2009

dwdiff version 1.6 released

This release allows improves the output of dwdiff to be more intuitive. A new option to mark deleted or inserted blocks of lines containing only whitespace (paragraph separators) has been added, as well as specification of background colors and custom colors.

10-10-2009

dwdiff announce mailinglist

A mailing list has been set up on which new releases of dwdiff will be anounced. The list can be found here.

10-10-2009

Download

The source for dwdiff is available here. Older releases are available here.

Several Linux distributions and BSD version are shipping dwdiff packages or build scripts/ports, for example Fedora Linux, FreeBSD and OpenBSD. For some Unix variants or derivatives, dwdiff packages are provided through external repositories:

  • SPARC/Solaris 2.5-10 and x86/Solaris 8-10, provided by Steve Christensen on his sunfreeware.com site.
  • Mac OS X, through MacPorts.
  • Slackware Linux, through Slackbuilds.org and Slacky.eu.
  • The OpenPKG project (a generic Unix/Linux packaging system).
  • Gentoo Ebuild script. To use this, copy it to your Portage overlay directory, enter ebuild <your directory>/dwdiff-1.7.ebuild digest, after which you can do emerge dwdiff.

If your distribution does not provide dwdiff packages, you can either build dwdiff from source, or you can try filing a feature request with the maintainers of your distribution.

Contact

You can reach me at: dwdiff @ REMOVE ghalkes.nl.
Releases are also announced on the mailing list

Copyright Notice

Copyright © 2006-2010 G.P. Halkes
dwdiff is distributed under the GNU General Public License version 3.

Versions of dwdiff before 1.3 were distributed under the Open Software License version 2.0.