Add the DragonFly cvs id and perform general cleanups on cvs/rcs/sccs ids. Most
[dragonfly.git] / gnu / usr.bin / sdiff / sdiff.1
1 .\" $FreeBSD: src/gnu/usr.bin/sdiff/sdiff.1,v 1.1.16.1 2003/02/23 18:02:27 keramida Exp $
2 .\" $DragonFly: src/gnu/usr.bin/sdiff/Attic/sdiff.1,v 1.2 2003/06/17 04:25:48 dillon Exp $
3 .\"
4 .TH SDIFF 1 "22sep1993" "GNU Tools" "GNU Tools"
5 .SH NAME
6 sdiff \- find differences between two files and merge interactively
7 .SH SYNOPSIS
8 .B sdiff
9 .B -o
10 outfile [options] from-file to-file
11 .SH DESCRIPTION
12 The
13 .I sdiff
14 command merges two files and interactively outputs the
15 results to
16 .IR outfile .
17
18 If
19 .I from-file
20 is a directory and
21 .I to-file
22 is not,
23 .I sdiff
24 compares the file in
25 .I from-file
26 whose file name is that of
27 .IR to-file ,
28 and vice versa.
29 .I from-file
30 and
31 .I to-file
32 may not both be
33 directories.
34
35 .I sdiff
36 options begin with
37 .BR \- ,
38 so normally
39 .I from-file
40 and
41 .I to-file
42 may not begin with
43 .BR \- .
44 However,
45 .B \-\-
46 as an
47 argument by itself treats the remaining arguments as file names even if
48 they begin with
49 .BR \- .
50 You may not use
51 .B \-
52 as an input file.
53
54 .I sdiff
55 without
56 .B \-o
57 (or
58 .BR \-\-output )
59 produces a
60 side-by-side difference.  This usage is obsolete; use
61 .B "diff \-\-side\-by\-side"
62 instead.
63 .SS Options
64 Below is a summary of all of the options that GNU
65 .I sdiff
66 accepts.
67 Each option has two equivalent names, one of which is a single
68 letter preceded by
69 .BR \- ,
70 and the other of which is a long name
71 preceded by
72 .BR \-\- .
73 Multiple single letter options (unless they take
74 an argument) can be combined into a single command line argument.  Long
75 named options can be abbreviated to any unique prefix of their name.
76 .TP
77 .B \-a
78 Treat all files as text and compare them line-by-line, even if they
79 do not appear to be text.
80 .TP
81 .B \-b
82 Ignore changes in amount of white space.
83 .TP
84 .B \-B
85 Ignore changes that just insert or delete blank lines.
86 .TP
87 .B \-d
88 Change the algorithm to perhaps find a smaller set of changes.  This
89 makes
90 .I sdiff
91 slower (sometimes much slower).
92 .TP
93 .B \-H
94 Use heuristics to speed handling of large files that have numerous
95 scattered small changes.
96 .TP
97 .B \-\-expand\-tabs
98 Expand tabs to spaces in the output, to preserve the alignment of tabs
99 in the input files.
100 .TP
101 .B \-i
102 Ignore changes in case; consider upper- and lower-case to be the same.
103 .TP
104 .BI "\-I " regexp
105 Ignore changes that just insert or delete lines that match
106 .IR regexp .
107 .TP
108 .B \-\-ignore\-all\-space
109 Ignore white space when comparing lines.
110 .TP
111 .B \-\-ignore\-blank\-lines
112 Ignore changes that just insert or delete blank lines.
113 .TP
114 .B \-\-ignore\-case
115 Ignore changes in case; consider upper- and lower-case to be the same.
116 .TP
117 .BI \-\-ignore\-matching\-lines= regexp
118 Ignore changes that just insert or delete lines that match
119 .IR regexp .
120 .TP
121 .B \-\-ignore\-space\-change
122 Ignore changes in amount of white space.
123 .TP
124 .B \-l
125 .br
126 .ns
127 .TP
128 .B \-\-left\-column
129 Print only the left column of two common lines.
130 .TP
131 .B \-\-minimal
132 Change the algorithm to perhaps find a smaller set of changes.  This
133 makes
134 .I sdiff
135 slower (sometimes much slower).
136 .TP
137 .BI "\-o " file
138 .br
139 .ns
140 .TP
141 .BI \-\-output= file
142 Put merged output into
143 .IR file .
144 This option is required for merging.
145 .TP
146 .B \-s
147 .br
148 .ns
149 .TP
150 .B \-\-suppress\-common\-lines
151 Do not print common lines.
152 .TP
153 .B \-\-speed\-large\-files
154 Use heuristics to speed handling of large files that have numerous
155 scattered small changes.
156 .TP
157 .B \-t
158 Expand tabs to spaces in the output, to preserve the alignment of tabs
159 in the input files.
160 .TP
161 .B \-\-text
162 Treat all files as text and compare them line-by-line, even if they
163 do not appear to be text.
164 .TP
165 .B \-v
166 .br
167 .ns
168 .TP
169 .B \-\-version
170 Output the version number of
171 .IR sdiff .
172 .TP
173 .BI "\-w " columns
174 .br
175 .ns
176 .TP
177 .BI \-\-width= columns
178 Use an output width of
179 .IR columns .
180 Note that for historical reasons, this option is
181 .B \-W
182 in
183 .IR diff ,
184 .B \-w
185 in
186 .IR sdiff .
187 .TP
188 .B \-W
189 Ignore horizontal white space when comparing lines.
190 Note that for historical reasons, this option is
191 .B \-w
192 in
193 .IR diff ,
194 .B \-W
195 in
196 .IR sdiff .
197 .SH SEE ALSO
198 cmp(1), comm(1), diff(1), diff3(1).
199
200 The
201 .B info
202 documentation of
203 .BR diff .
204 .SH DIAGNOSTICS
205 An exit status of 0 means no differences were found, 1 means some
206 differences were found, and 2 means trouble.