1dwdiff(1) dwdiff delimited word diff program dwdiff(1)
2
3
4
6 dwdiff - a delimited word diff program
7
9 dwdiff [OPTIONS] <OLD FILE> <NEW FILE>
10
12 dwdiff is a front-end for the diff program that operates at the word
13 level instead of the line level. It is different from wdiff in that it
14 allows the user to specify what should be considered whitespace, and in
15 that it takes an optional list of characters that should be considered
16 delimiters. Delimiters are single characters that are treated as if
17 they are words, even when there is no whitespace separating them from
18 preceding words or delimiters. dwdiff is mostly command-line compatible
19 with wdiff. Only the --autopager, --terminal and --avoid-wraps options
20 are not supported.
21
22 The default output from dwdiff is the new text, with the deleted and
23 inserted parts annotated with markers. Command line options are avail‐
24 able to change both what is printed, and the markers.
25
27 dwdiff accepts the following options (Note that all strings will first
28 be escape expanded. All standard \-escapes are supported):
29
30 -d <delimiters>, --delimiters=<delimiters>
31 Specify a list of characters to be used as delimiters.
32
33 -W <whitespace>, --whitespace=<whitespace>
34 Specify a list of characters to be used as whitespace.
35
36 -v, --version
37 Print version and copyright information.
38
39 -D <option>, --diff-option=<option>
40 Add an option to the command line of the diff(1) command. This
41 option can be used to tell the diff command that it should
42 change its matching algorithm. WARNING: make sure that the
43 options passed do not change the output of the diff program, or
44 dwdiff will fail. The GNU and most BSD versions of diff accept
45 the -d or --minimal option to make diff find a minimal diff at
46 extra cost. See the diff manual page for more information.
47
48 -c[<spec>], --color[=<spec>]
49 Color mode. The optional <spec> can be used to customise the
50 colors. <spec> consists of [<delete>],[<insert>]. If either is
51 ommited it will be set to its default color (bright red or
52 bright green respectively). To obtain a list of permissable
53 color names, use the word ``list'' as <spec>. The default mark‐
54 ers will not be printed in color mode.
55
56 The following options are the same as those for the wdiff program:
57
58 -h, --help
59 Display a short help message.
60
61 -1, --no-deleted
62 Suppress printing of words deleted from the first file.
63
64 -2, --no-inserted
65 Suppress printing of words inserted in the second file.
66
67 -3, --no-common
68 Suppress printing of words common to both files.
69
70 -i, --ignore-case
71 Ignore differences in case when comparing words. This option is
72 only available if the diff program that is called provides it.
73
74 -s, --statistics
75 Print statistics when done. The numbers printed include the num‐
76 ber of words from in both files, the number of deleted words,
77 the number of inserted words, and the number of changed words.
78 The number of changed words is counted as the number of words
79 that are removed from the first file, and the number of words
80 that replace them from the second file. All of these numbers are
81 also expressed as a percentage of the total number of words in
82 the file the words came from.
83
84 -p, --printer
85 Use overstriking with an underscore and bold text to emphasize
86 changes. This is implemented by first printing the underscore or
87 a duplicate of the character to be printed, followed by a
88 backspace, followed by the character. On regular terminals you
89 won't see any effect. The less(1) command will however show
90 underlined and bold text.
91
92 The standard markers for the begin and end of deleted and
93 inserted text are suppressed, but any markers specified on the
94 command line will still be printed.
95
96 -l, --less-mode
97 As -p but also overstrike deleted whitespace.
98
99 -w <string>, --start-delete=<string>
100 Specify a string to mark begin of deleted text.
101
102 -x <string>, --stop-delete=<string>
103 Specify a string to mark end of deleted text.
104
105 -y <string>, --start-insert=<string>
106 Specify a string to mark begin of inserted text.
107
108 -z <string>, --stop-insert=<string>
109 Specify a string to mark end of inserted text.
110
111 A single dash (-) as a file can be used to denote standard input. Only
112 one file can be read from standard input. To stop dwdiff from inter‐
113 preting file names that start with a dash as options, one can specify a
114 double dash (--) after which dwdiff will interpret any following argu‐
115 ments as files to read.
116
118 If you think you have found a bug, please check that you are using the
119 latest version of dwdiff [http://os.ghalkes.nl/dwdiff]. When reporting
120 bugs, please include a minimal example that demonstrates the problem.
121
123 G.P. Halkes <dwdiff@ghalkes.nl>
124
126 Copyright © 2006 G.P. Halkes
127 dwdiff is licensed under the Open Software License version 2.0.
128 For more details on the license, see the file COPYING in the documenta‐
129 tion directory. On Un*x systems this is usually
130 /usr/share/doc/dwdiff-1.2.1.
131
133 wdiff(1), diff(1)
134
135
136
137Version 1.2.1 28-10-2006 dwdiff(1)