dwdiff(1)

NAME
dwdiff - a delimited word diff program

SYNOPSIS
dwdiff [OPTIONS] <OLD FILE> <NEW FILE>

DESCRIPTION
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 command-line 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.

OPTIONS
dwdiff accepts the following options (Note that all strings will first be escape expanded. All standard \-escapes are supported):

-d <delimiters>, --delimiters=<delimiters>
    Specify a list of characters to be used as delimiters.

-W <whitespace>, --whitespace=<whitespace>
    Specify a list of characters to be used as whitespace.

-v, --version
    Print version and copyright information.

-D <option>, --diff-option=<option>
    Add an option to the command line of the diff(1) command. This option can be used to tell the diff command that it should change its matching algorithm. WARNING: make sure that the options passed do not change the output of the diff program, or dwdiff will fail. The GNU and most BSD versions of diff accept the -d or --minimal option to make diff find a minimal diff at extra cost. See the diff manual page for more information.

-c[<spec>], --color[=<spec>]
    Color mode. The optional <spec> can be used to customise the colors. <spec> consists of [<delete>],[<insert>]. If either is ommited it will be set to its default color (bright red or bright green respectively). To obtain a list of permissable color names, use the word ``list'' as <spec>. The default markers will not be printed in color mode.

-L[<width>], --line-numbers[=<width>]
    Show line numbers at the start of each line. The line numbers displayed are the line number in the old file and the line number in the new file respectively. The optional <width> argument is the minimum number of positions per line number.

-C<num>, --context=<num>
    Show <num> lines of context before and after each changes. A line with only -- is printed between blocks of changes.

The following options are the same as those for the wdiff program:

-h, --help
    Display a short help message.

-1, --no-deleted
    Suppress printing of words deleted from the first file.

-2, --no-inserted
    Suppress printing of words inserted in the second file.

-3, --no-common
    Suppress printing of words common to both files.

-i, --ignore-case
    Ignore differences in case when comparing words. This option is only available if the diff program that is called provides it.

-s, --statistics
    Print statistics when done. The numbers printed include the number of words from in both files, the number of deleted words, the number of inserted words, and the number of changed words. The number of changed words is counted as the number of words that are removed from the first file, and the number of words that replace them from the second file. All of these numbers are also expressed as a percentage of the total number of words in the file the words came from.

-p, --printer
    Use overstriking with an underscore and bold text to emphasize changes. This is implemented by first printing the underscore or a duplicate of the character to be printed, followed by a backspace, followed by the character. On regular terminals you won't see any effect. The less(1) command will however show underlined and bold text. The standard markers for the begin and end of deleted and inserted text are suppressed, but any markers specified on the command line will still be printed.

-l, --less-mode
    As -p but also overstrike deleted whitespace.

-w <string>, --start-delete=<string>
    Specify a string to mark begin of deleted text.

-x <string>, --stop-delete=<string>
    Specify a string to mark end of deleted text.

-y <string>, --start-insert=<string>
    Specify a string to mark begin of inserted text.

-z <string>, --stop-insert=<string>
    Specify a string to mark end of inserted text.

A single dash (-) as a file can be used to denote standard input. Only one file can be read from standard input. To stop dwdiff from interpreting file names that start with a dash as options, one can specify a double dash (--) after which dwdiff will interpret any following arguments as files to read.

BUGS
If you think you have found a bug, please check that you are using the latest version of dwdiff [http://os.ghalkes.nl/dwdiff]. When reporting bugs, please include a minimal example that demonstrates the problem.

AUTHOR
G.P. Halkes <dwdiff@ghalkes.nl>

COPYRIGHT
Copyright © 2006-2007 G.P. Halkes
dwdiff is licensed under the GNU General Public License version 3.
For more details on the license, see the file COPYING in the documentation directory. On Un*x systems this is usually /usr/share/doc/dwdiff-1.3.

SEE ALSO
wdiff(1), diff(1)