4.3BSD beta release manual page
[unix-history] / usr / src / usr.bin / diff / diff3 / diff3.1
CommitLineData
fad0acda 1.\" @(#)diff3.1 6.1 (Berkeley) %G%
eadf9268 2.\"
fad0acda 3.TH DIFF3 1 ""
eadf9268
KM
4.AT 3
5.SH NAME
6diff3 \- 3-way differential file comparison
7.SH SYNOPSIS
8.B diff3
9[
10.B \-ex3
11]
12file1 file2 file3
13.SH DESCRIPTION
14.I Diff3
15compares three versions of a file,
16and publishes disagreeing ranges of text
17flagged with these codes:
18.TP 16
19====
20all three files differ
21.TP 16
22====1
23.IR file1 " is different"
24.TP 16
25====2
26.IR file2 " is different"
27.TP 16
28====3
29.IR file3 " is different"
30.PP
31The type of change suffered in converting a given range
32of a given file to some other is
33indicated in one of these ways:
34.TP 16
35.IB f " : " n1 " a"
36Text is to be appended after line number
37.I n1
38in file
39.I f,
40where
41.I f
42= 1, 2, or 3.
43.TP 16
44.IB f " : " n1 " , " n2 " c"
45Text is to be
46changed in the range line
47.I n1
48to line
49.IR n2 .
50If
51.I n1
52=
53.I n2,
54the range may be abbreviated to
55.IR n1 .
56.PP
57The original contents of the range follows immediately
58after a
59.B c
60indication.
61When the contents of two
62files are identical, the contents of the lower-numbered
63file is suppressed.
64.PP
65Under the
66.B \-e
67option,
68.I diff3
69publishes a script for the editor
70.I ed
71that will incorporate into
72.I file1
73all changes between
74.I file2
75and
76.I file3,
77.IR i.e .
78the changes that normally would be flagged ==== and ====3.
79Option
80.B \-x
81(\fB\-3\fR)
82produces a script to incorporate
83only changes flagged ==== (====3).
84The following command will apply the resulting script to
85`file1'.
86.PP
87.ti 16n
88(cat script; echo \'1,$p\') \(bv ed \- file1
89.SH FILES
90/tmp/d3?????
91.br
92/usr/lib/diff3
93.SH "SEE ALSO"
94diff(1)
95.SH BUGS
96Text lines that consist of a single `.' will
97defeat
98.B \-e.