MPE/iX Shell and Utilities Reference Manual, Vol 1
diff3(1) MPE/iX Shell and Utilities diff3(1)
–x produces an editor script of only those changes where all three files differ.
–3 produces an editor script containing changes which occur only in file3.
Under the –E and –X options, diff3 highlights overlapping regions as follows:
<<<<<<<< file1
lines from file1
========
lines from file3
>>>>>>>> file3
If you specify the arguments mark1 and/or mark3 on the command line, diff3 uses them as
labels in this sort of highlighting instead of the names of file1 and file3.
EXAMPLES
Here are two commands that you can submit to the shell.
(diff3 -e file1 file2 file3 ; echo ’1,$p’) | ed -s file1
This simply prints file1 incorporating the changes between file2 and file3; it does not save
those changes.
(diff3 -e file1 file2 file3; echo ’wq’) | ed -s file1
This edits file1 and saves the changes.
DIAGNOSTICS
Possible exit status values are:
0 There were no differences among the three files.
1 Some differences were found.
2 An error occurred.
2+n With the options that check for overlapping differences (–E and –X), the status indi-
cates that there were n overlapping ranges of differences; for example, a status of 3
indicates one overlap.
Messages
Message: cannot find "diff" command
Cause: diff3 was unable to find the diff command.
Action: Make sure that the directory which contains diff is included in the setting of
the
PATH
environment variable.
1-182 Commands and Utilities