

diff3                        Command                        diff3




Summarize differences among three files

ddiiffff33 [-eexx33] _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: _laa
     Text is to be appended after line l in filen.

_n: _l,_mcc
     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


