dwdiff
TLDR
Compare two files word by word
SYNOPSIS
dwdiff [options] file1 file2
DESCRIPTION
dwdiff compares files word-by-word rather than line-by-line, making it easier to spot small changes in prose or documentation. It highlights deleted words (from the first file) and inserted words (in the second file).
The tool is particularly useful for comparing text documents, translations, or any content where line-based diffs produce confusing output. It shows exactly which words changed between versions.
PARAMETERS
-c, --color
Color output (default in terminals).-L, --line-numbers
Show line numbers.-s, --statistics
Print statistics at end.-w, --ignore-whitespace
Ignore whitespace differences.-i, --ignore-case
Case-insensitive comparison.-d delimiters
Characters that delimit words.-P
Use punctuation as delimiters.-1
Read old file from stdin.-2
Read new file from stdin.-3
Use pager for output.--wdiff-output
Produce wdiff-compatible output.
OUTPUT FORMAT
CAVEATS
Best suited for prose, not code. Large files may be slow to process. Word boundaries depend on delimiter settings. May need adjustment for non-English text or special characters.
HISTORY
dwdiff was written by G.P. Halkes as an improved alternative to the older wdiff utility. It provides better handling of Unicode, color output, and more flexible word delimiting options.


