Comparing and Merging Files
8.3 Generating the Merged Output Directly
With the `-m' or `--merge' option,
diff3 outputs the
merged file directly. This is more efficient than using
generate it, and works even with non-text files that
reject. If you specify `-m' without an
ed script option,
`-A' (`--show-all') is assumed.
For example, the command `diff3 -m lao tzu tao'
(see section 7.1 A Third Sample Input File for a copy of the input files) would output
The Way that can be told of is not the eternal Way;
The name that can be named is not the eternal name.
The Nameless is the origin of Heaven and Earth;
The Named is the mother of all things.
Therefore let there always be non-being,
so we may see their subtlety,
And let there always be being,
so we may see their result.
The two are the same,
But after they are produced,
they have different names.
They both may be called deep and profound.
Deeper and more profound,
The door of all subtleties!
-- The Way of Lao-Tzu, tr. Wing-tsit Chan