DIFF3(1) COMMAND REFERENCE DIFF3(1)
NAME
diff3 - 3-way differential file comparison
SYNOPSIS
diff3 [ -{e,x,3} ] file1 file2 file3
DESCRIPTION
Diff3 compares three versions of a file, and publishes
disagreeing ranges of text flagged with these codes:
====
all three files differ
====1
file1 is different
====2
file2 is different
====3
file3 is different
The type of change suffered in converting a given range of a
given file to some other is indicated in one of these ways:
f : n1 a
Text is to be appended after line number n1 in file f,
where f = 1, 2, or 3.
f : n1 , n2 c
Text is to be changed in the range line n1 to line n2.
If n1 = n2, the range may be abbreviated to n1.
The original contents of the range follows immediately after
a c indication. When the contents of two files are
identical, the contents of the lower-numbered file is
suppressed.
OPTIONS
The following options are mutually exclusive:
-e Publishes a script for the editor ed that will
incorporate into file1 all changes between file2 and
file3, i.e. the changes that normally would be flagged
==== and ====3.
-x Produces a script to incorporate only changes flagged
====. The following command will apply the resulting
script to file1.
Printed 10/17/86 1
DIFF3(1) COMMAND REFERENCE DIFF3(1)
(cat script; echo '1,$p') | ed - file1
-3 Same as -x except that it works on changes flagged
====3.
EXAMPLES
The following example will print on standard out a script
for ed that will incorporate into ver1 all the changes
flagged ====.
diff3 -x ver1 ver2 ver3
FILES
/tmp/d3????? Temporary data file.
/usr/lib/diff3 Output formatter.
RETURN VALUE
[NO_ERRS] Command completed without error.
[USAGE] Incorrect command line syntax. Execution
terminated.
[P_ERR] A system error occurred. Execution
terminated. See intro(2) for more
information on system errors.
[INTERNAL] An unexpected error occurred. Execution was
terminated. Record the message and save the
core file for analysis. Contact service
personnel at your Tektronix field office.
CAVEATS
Text lines that consist of a single `.' will defeat -e.
SEE ALSO
diff(1), rcsdiff(1rcs).
Printed 10/17/86 2
%%index%%
na:72,78;
sy:150,208;
de:358,1083;
op:1441,538;2123,157;
ex:2280,258;
fi:2538,169;
rv:2707,654;
ca:3361,130;
se:3491,124;
%%index%%000000000155