1dwdiff(1)                 delimited word diff program                dwdiff(1)
2
3
4

NAME

6       dwdiff - a delimited word diff program
7

SYNOPSIS

9       dwdiff [OPTIONS] <OLD FILE> <NEW FILE>
10

DESCRIPTION

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

OPTIONS

27       dwdiff  accepts the following options (Note that all strings will first
28       be escape expanded. All standard \-escapes are supported, as well as \u
29       and \U Unicode escapes):
30
31       -h, --help
32              Display a short help message.
33
34       -v, --version
35              Print version and copyright information.
36
37       -d <delimiters>, --delimiters=<delimiters>
38              Specify a list of characters to be used as delimiters.
39
40       -P, --punctuation>
41              Use punctuation characters as delimiters. The exact set of punc‐
42              tuation characters depends on the current locale.
43
44       -W <whitespace>, --whitespace=<whitespace>
45              Specify a list of characters to be used as whitespace.
46
47       -1, --no-deleted
48              Suppress printing of words deleted from the first file.
49
50       -2, --no-inserted
51              Suppress printing of words inserted in the second file.
52
53       -3, --no-common
54              Suppress printing of words common to both files.
55
56       -L[<width>], --line-numbers[=<width>]
57              Show line numbers at the start of each line.  The  line  numbers
58              displayed  are the line number in the old file and the line num‐
59              ber in the new file respectively. The optional <width>  argument
60              is the minimum number of positions per line number.
61
62       -C<num>, --context=<num>
63              Show  <num>  lines  of  context before and after each changes. A
64              line with only -- is printed between blocks of changes.
65
66       -s, --statistics
67              Print statistics when done. The numbers printed include the num‐
68              ber  of  words  from in both files, the number of deleted words,
69              the number of inserted words, and the number of  changed  words.
70              The  number  of  changed words is counted as the number of words
71              that are removed from the first file, and the  number  of  words
72              that replace them from the second file. All of these numbers are
73              also expressed as a percentage of the total number of  words  in
74              the file the words came from.
75
76       -i, --ignore-case
77              Ignore  differences in case when comparing words. This option is
78              only available if the diff program that is called provides it.
79
80       -I, --ignore-formatting
81              Ignore differences in  formatting  of  characters.  This  option
82              switches   to  using  the  Unicode  compatibility  decomposition
83              instead  of  the  canonical  decomposition.   The  compatibility
84              decomposition  discards formatting information. For example, the
85              ligature fi will be decomposed into two separate characters  for
86              the  purposes  of comparison. However, also super- and subscript
87              will be regarded equal as well as  different  rotations  of  the
88              same character.
89
90       -D <option>, --diff-option=<option>
91              Add  an  option to the command line of the diff(1) command. This
92              option can be used to tell  the  diff  command  that  it  should
93              change  its  matching  algorithm.  WARNING:  make  sure that the
94              options passed do not change the output of the diff program,  or
95              dwdiff  will  fail. The GNU and most BSD versions of diff accept
96              the -d or --minimal option to make diff find a minimal  diff  at
97              extra cost. See the diff manual page for more information.
98
99       -c[<spec>], --color[=<spec>]
100              Color  mode.  The  optional  <spec> can be used to customize the
101              colors.  <spec> consists of [<delete>],[<insert>]. If either  is
102              ommited  it  will  be  set  to  its default color (bright red or
103              bright green respectively). Both parts of the <spec> consist  of
104              [<foreground>][:<background>].  To  obtain a list of permissable
105              color names, use the word ``list'' as <spec>. Alternatively, you
106              can  specify any escape sequence to set attributes as a color by
107              prepending e:.
108
109              The standard markers for  the  begin  and  end  of  deleted  and
110              inserted  text  are suppressed, but any markers specified on the
111              command line will still be printed.
112
113       -l, --less-mode
114              As -p but also overstrike deleted whitespace.
115
116       -p, --printer
117              Use overstriking with an underscore and bold text  to  emphasize
118              changes. This is implemented by first printing the underscore or
119              a duplicate of the  character  to  be  printed,  followed  by  a
120              backspace,  followed by the character.  On regular terminals you
121              won't see any effect. The  less(1)  command  will  however  show
122              underlined and bold text.
123
124              The  standard  markers  for  the  begin  and  end of deleted and
125              inserted text are suppressed, but any markers specified  on  the
126              command line will still be printed.
127
128       -m<num>, --match-context=<num>
129              Use  <num> words of context before and after words for matching.
130              Words in the old text will then only match words in the new text
131              if words surrounding them are also equal. This improves the out‐
132              put for dwdiff for large changes with frequently occuring words.
133              However,  using  context  requires more disk space and more pro‐
134              cessing time. The default value is 1. Set this option  to  0  to
135              revert to the pre 1.5 behavior.
136
137       --aggregate-changes
138              Allow  multiple  close  changes  to be treated as one change, if
139              context  words  are  used  (see  --match-context).  This  option
140              reduces  the processing time as the changes reported by the diff
141              program are not post-processed to give more precise results.
142
143       -S[<marker>], --paragraph-separator[=<marker>]
144              Show insertion or deletion of blocks of lines with  only  white‐
145              space  characters.  A special marker is inserted into the output
146              to indicate these blocks. The default marker is <-->.
147
148       --wdiff-output
149              Create wdiff compatible output. The dwdiff program uses  a  dif‐
150              ferent output algorithm, which provides a more intuitive output.
151
152       -w <string>, --start-delete=<string>
153              Specify a string to mark begin of deleted text.
154
155       -x <string>, --stop-delete=<string>
156              Specify a string to mark end of deleted text.
157
158       -y <string>, --start-insert=<string>
159              Specify a string to mark begin of inserted text.
160
161       -z <string>, --stop-insert=<string>
162              Specify a string to mark end of inserted text.
163
164       A  single dash (-) as a file can be used to denote standard input. Only
165       one file can be read from standard input. To stop  dwdiff  from  inter‐
166       preting file names that start with a dash as options, one can specify a
167       double dash (--) after which dwdiff will interpret any following  argu‐
168       ments as files to read.
169

BUGS

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

AUTHOR

176       G.P. Halkes <dwdiff@ghalkes.nl>
177
179       Copyright © 2006-2010 G.P. Halkes
180       dwdiff is licensed under the GNU General Public License version 3.
181       For more details on the license, see the file COPYING in the documenta‐
182       tion    directory.    On    Un*x    systems     this     is     usually
183       /usr/share/doc/dwdiff-1.7.
184

SEE ALSO

186       dwfilter(1), wdiff(1), diff(1)
187
188
189
190Version 1.7                       13-02-2010                         dwdiff(1)
Impressum