9070 Remove wanboot from gate
[unleashed.git] / usr / src / man / man1 / diff3.1
blob46b1b7ae2ac884894b6d2e48530390327681ff66
1 '\" te
2 .\" Copyright 2014 Nexenta Systems, Inc.  All rights reserved.
3 .\"  Copyright 1989 AT&T  Copyright (c) 2005, Sun Microsystems, Inc.  All Rights Reserved
4 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
5 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
6 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
7 .TH DIFF3 1 "Oct 22, 2014"
8 .SH NAME
9 diff3 \- 3-way differential file comparison
10 .SH SYNOPSIS
11 .LP
12 .nf
13 \fBdiff3\fR [\fB-exEX3\fR] \fIfilename1\fR \fIfilename2\fR \fIfilename3\fR
14 .fi
16 .SH DESCRIPTION
17 .sp
18 .LP
19 \fBdiff3\fR compares three versions of a file. It publishes disagreeing ranges
20 of text flagged with the following codes:
21 .sp
22 .ne 2
23 .na
24 \fB\fB====\fR\fR
25 .ad
26 .RS 9n
27 all three files differ
28 .RE
30 .sp
31 .ne 2
32 .na
33 \fB\fB====1\fR\fR
34 .ad
35 .RS 9n
36 \fIfilename1\fR is different
37 .RE
39 .sp
40 .ne 2
41 .na
42 \fB\fB====2\fR\fR
43 .ad
44 .RS 9n
45 \fIfilename2\fR is different
46 .RE
48 .sp
49 .ne 2
50 .na
51 \fB\fB====3\fR\fR
52 .ad
53 .RS 9n
54 \fIfilename3\fR is different
55 .RE
57 .sp
58 .LP
59 The type of change suffered in converting a given range of a given file to some
60 other is indicated in one of the following ways:
61 .sp
62 .ne 2
63 .na
64 \fB\fIf\fR\fB : \fR\fIn1\fR\fB a\fR\fR
65 .ad
66 .RS 17n
67 Text is to be appended after line number \fIn1\fR in file \fIf\fR, where
68 \fIf\fR = 1, 2, or 3.
69 .RE
71 .sp
72 .ne 2
73 .na
74 \fB\fIf\fR\fB : \fR\fIn1\fR\fB , \fR\fIn2\fR\fB c\fR\fR
75 .ad
76 .RS 17n
77 Text is to be changed in the range line \fIn1\fR to line \fIn2\fR. If \fIn1\fR
78 = \fIn\fR2, the range can be abbreviated to \fIn1\fR.
79 .RE
81 .sp
82 .LP
83 The original contents of the range follows immediately after a \fBc\fR
84 indication. When the contents of two files are identical, the contents of the
85 lower-numbered file is suppressed.
86 .sp
87 .LP
88 The following command applies the resulting script to \fIfilename1\fR.
89 .sp
90 .in +2
91 .nf
92 \fB(cat script; echo a\'1,$pa\') | ed \(mi \fR\fIfilename1\fR
93 .fi
94 .in -2
95 .sp
97 .SH OPTIONS
98 .sp
99 .LP
100 The following options are supported:
102 .ne 2
104 \fB\fB-e\fR \fR
106 .RS 7n
107 Produce a script for the \fBed\fR(1) editor that incorporates into
108 \fIfilename1\fR all changes between \fIfilename2\fR and \fIfilename3\fR (that
109 is, the changes that normally would be flagged \fB====\fR and \fB====3\fR).
111 Text lines that consist of a single dot (\fB\&.\fR defeat the \fB-e\fR option.
115 .ne 2
117 \fB\fB-E\fR \fR
119 .RS 7n
120 Produce a script that incorporates all changes between \fIfilename2\fR and
121 \fIfilename3\fR, but treat overlapping changes (that is, changes that would be
122 flagged with \fB====\fR in the normal listing) differently. The overlapping
123 lines from both files are inserted by the edit script, bracketed by
124 \fB<<<<<<\fR and \fB>>>>>>\fR lines.
128 .ne 2
130 \fB\fB-x\fR \fR
132 .RS 7n
133 Produce a script to incorporate only changes flagged \fB====\fR.
137 .ne 2
139 \fB\fB-X\fR \fR
141 .RS 7n
142 Produce a script that incorporates only changes flagged \fB====\fR, but treat
143 these changes in the manner of the \fB-E\fR option.
147 .ne 2
149 \fB\fB-3\fR \fR
151 .RS 7n
152 Produce a script to incorporate only changes flagged \fB====3\fR.
155 .SH USAGE
158 See \fBlargefile\fR(5) for the description of the behavior of \fBdiff3\fR when
159 encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
160 .SH FILES
162 .ne 2
164 \fB\fB/tmp/d3*\fR \fR
166 .RS 23n
171 .ne 2
173 \fB\fB/usr/lib/diff3prog\fR \fR
175 .RS 23n
179 .SH EXIT STATUS
182 The following exit values are returned:
184 .ne 2
186 \fB\fB0\fR \fR
188 .RS 6n
189 Successful completion.
193 .ne 2
195 \fB\fB1\fR\fR
197 .RS 6n
198 An error occurred. A difference was found or there was a fatal error.
202 .ne 2
204 \fB\fB>1\fR\fR
206 .RS 6n
207 A fatal error occurred.
212 Return values do not work the same as \fBdiff\fR(1) or other vendor's versions
213 of \fBdiff3\fR.
214 .SH ATTRIBUTES
217 See \fBattributes\fR(5) for descriptions of the following attributes:
222 box;
223 c | c
224 l | l .
225 ATTRIBUTE TYPE  ATTRIBUTE VALUE
227 CSI     Enabled
230 .SH SEE ALSO
233 \fBdiff\fR(1), \fBattributes\fR(5), \fBlargefile\fR(5)
234 .SH NOTES
237 Files longer than 64 Kbytes do not work.