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