|
|
coherent
diff3 Command diff3
Summarize differences among three files
ddiiffff33 [-eexx33] _f_i_l_e_1 _f_i_l_e_2 _f_i_l_e_3
diff3 summarizes the differences among three text files. Each
difference encountered is headed by one of the following
separators, which categorizes how many of the three input files
differ in a given range. The headers are as follows
====
All of the files are different.
====_n
Only the nth file differs, where n may be 1, 2, or 3.
For each set of changes marked as above, the actual change is in-
dicated for each file using a notation similar to commands to ed.
For each filen the following is printed:
_n: _laa
Text is to be appended after line l in filen.
_n: _l,_mcc
The text from line l to line m is to be changed for filen.
The original text from filen follows this line. If this
text is identical for two of the files, only the latter
(higher numbered) of the two is printed.
Options are available to print a script of commands to ed. With
the -e option, a script that will make all changes between file2
and file3 to file1 is produced. This script is based upon all
changes flagged with ==== or ====3 separators, as described
above.
The -x option prints only those changes where all three files
differ, i.e., those flagged with ====.
The -3 option requests only those changes where file3 differs.
***** Example *****
The following command sequence produces a script, applies it to
file1, and sends the result to the standard output.
(diff3 -e file1 file2 file3; echo '1,$p') | ed - file1
***** Files *****
/tmp/d3*
/usr/lib/diff3
COHERENT Lexicon Page 1
diff3 Command diff3
***** See Also *****
commands, diff, ed
***** Diagnostics *****
An exit status of zero indicates all three files were identical,
one indicates differences, and two indicates some other failure.
COHERENT Lexicon Page 2
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.