1diff3(1)                         User Commands                        diff3(1)
2
3
4

NAME

6       diff3 - 3-way differential file comparison
7

SYNOPSIS

9       diff3 [-exEX3] filename1 filename2 filename3
10
11

DESCRIPTION

13       diff3  compares  three  versions  of  a  file. It publishes disagreeing
14       ranges of text flagged with the following codes:
15
16       ====     all three files differ
17
18
19       ====1    filename1is different
20
21
22       ====2    filename2is different
23
24
25       ====3    filename3is different
26
27
28
29       The type of change suffered in converting a given range of a given file
30       to some other is indicated in one of the following ways:
31
32       f : n1 a         Text is to be appended after line number n1 in file f,
33                        where f = 1, 2, or 3.
34
35
36       f : n1 , n2 c    Text is to be changed in the range line n1 to line n2.
37                        If n1 = n2, the range can be abbreviated to n1.
38
39
40
41       The  original contents of the range follows immediately after a c indi‐
42       cation. When the contents of two files are identical, the  contents  of
43       the lower-numbered file is suppressed.
44
45
46       The following command applies the resulting script to filename1.
47
48         (cat script; echo a´1,$pa´) | ed − filename1
49
50
51

OPTIONS

53       The following options are supported:
54
55       -e     Produce  a  script  for  the ed(1) editor that incorporates into
56              filename1 all changes between filename2 and filename3 (that  is,
57              the changes that normally would be flagged ==== and ====3).
58
59              Text lines that consist of a single dot (. defeat the -e option.
60
61
62       -E     Produce a script that incorporates all changes between filename2
63              and filename3, but treat overlapping changes (that  is,  changes
64              that  would  be flagged with ==== in the normal listing) differ‐
65              ently. The overlapping lines from both files are inserted by the
66              edit script, bracketed by <<<<<< and >>>>>> lines.
67
68
69       -x     Produce a script to incorporate only changes flagged ====.
70
71
72       -X     Produce  a  script  that incorporates only changes flagged ====,
73              but treat these changes in the manner of the -E option.
74
75
76       -3     Produce a script to incorporate only changes flagged ====3.
77
78

USAGE

80       See largefile(5) for the description of  the  behavior  of  diff3  when
81       encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
82

FILES

84       /tmp/d3*
85
86
87       /usr/lib/diff3prog
88
89

EXIT STATUS

91       The following exit values are returned:
92
93       0     Successful completion.
94
95
96       1     An  error  occurred.  A difference was found or there was a fatal
97             error.
98
99
100       >1    A fatal error occurred.
101
102
103
104       Return values do not work the same as diff(1) or  other  vendor's  ver‐
105       sions of diff3.
106

ATTRIBUTES

108       See attributes(5) for descriptions of the following attributes:
109
110
111
112
113       ┌─────────────────────────────┬─────────────────────────────┐
114       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
115       ├─────────────────────────────┼─────────────────────────────┤
116       │Availability                 │SUNWesc                      │
117       ├─────────────────────────────┼─────────────────────────────┤
118       │CSI                          │Enabled                      │
119       └─────────────────────────────┴─────────────────────────────┘
120

SEE ALSO

122       diff(1), attributes(5), largefile(5)
123

NOTES

125       Files longer than 64 Kbytes do not work.
126
127
128
129SunOS 5.11                        7 Nov 2005                          diff3(1)
Impressum