wdiff
Word-by-word file comparison tool
TLDR
SYNOPSIS
wdiff [-s] [-i] [options] file1 file2
DESCRIPTION
wdiff compares two files on a word-by-word basis rather than line-by-line like traditional diff. This makes it particularly useful for comparing prose and text documents where changes often involve individual words within paragraphs rather than entire lines.
By default, deleted words are enclosed in `[-...-]` markers and inserted words in `{+...+}` markers, making changes easy to spot in the output. These markers can be customized with ANSI escape codes to produce colored output highlighting additions and deletions visually.
The statistics mode shows counts of deleted, inserted, and common words along with percentage changes. Case-insensitive comparison is available for situations where capitalization differences should be ignored.
PARAMETERS
-s, --statistics
Show statistics.-i, --ignore-case
Case insensitive.-c, --common
Show common words.-n, --avoid-wrapping
No wrap markers.-w STRING
Start delete marker.-x STRING
End delete marker.-y STRING
Start insert marker.-z STRING
End insert marker.
CAVEATS
Large files may be slow. Complex formatting lost. Line structure ignored.
HISTORY
wdiff was written for comparing text documents. It provides human-readable differences for prose content.

