2 .\" Copyright 1989 AT&T Copyright (c) 1996, Sun Microsystems, Inc. All Rights Reserved
3 .\" 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.
4 .\" 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.
5 .\" 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]
6 .TH SDIFF 1 "Dec 20, 1996"
8 sdiff \- print differences between two files side-by-side
12 \fBsdiff\fR [\fB-l\fR] [\fB-s\fR] [\fB-o\fR \fIoutput\fR] [\fB-w\fR \fIn\fR] \fIfilename1\fR \fIfilename2\fR
18 \fBsdiff\fR uses the output of the \fBdiff\fR command to produce a side-by-side
19 listing of two files indicating lines that are different. Lines of the two
20 files are printed with a blank gutter between them if the lines are identical,
21 a \fB<\fR in the gutter if the line appears only in \fIfilename1\fR, a \fB>\fR
22 in the gutter if the line appears only in \fIfilename2\fR, and a \fB|\fR for
23 lines that are different. (See the \fBEXAMPLES\fR section below.)
31 Print only the left side of any lines that are identical.to
40 Do not print identical lines.
46 \fB\fB-o\fR\fI output\fR \fR
49 Use the argument \fIoutput\fR as the name of a third file that is created as a
50 user-controlled merge of \fIfilename1\fR and \fIfilename2\fR. Identical lines
51 of \fIfilename1\fR and \fIfilename2\fR are copied to \fIoutput\fR. Sets of
52 differences, as produced by \fBdiff\fR, are printed; where a set of differences
53 share a common gutter character. After printing each set of differences,
54 \fBsdiff\fR prompts the user with a \fB%\fR and waits for one of the following
62 Append the left column to the output file.
71 Append the right column to the output file.
80 Turn on silent mode; do not print identical lines.
98 Call the editor with the left column.
107 Call the editor with the right column.
116 Call the editor with the concatenation of left and right.
125 Call the editor with a zero length file.
134 Exit from the program.
137 On exit from the editor, the resulting file is concatenated to the end of the
144 \fB\fB-w\fR\fI n\fR \fR
147 Use the argument \fIn\fR as the width of the output line. The default line
148 length is 130 characters.
154 See \fBlargefile\fR(5) for the description of the behavior of \fBsdiff\fR when
155 encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
158 \fBExample 1 \fRAn example of the \fBsdiff\fR command.
161 A sample output of \fBsdiff\fR follows.
176 .SH ENVIRONMENT VARIABLES
179 If any of the \fBLC_*\fR variables ( \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR,
180 \fBLC_TIME\fR, \fBLC_COLLATE\fR, \fBLC_NUMERIC\fR, and \fBLC_MONETARY\fR ) (see
181 \fBenviron\fR(5)) are not set in the environment, the operational behavior of
182 \fBsdiff\fR for each corresponding locale category is determined by the value
183 of the \fBLANG\fR environment variable. If \fBLC_ALL\fR is set, its contents
184 are used to override both the \fBLANG\fR and the other \fBLC_*\fR variables.
185 If none of the above variables is set in the environment, the "C" locale
186 determines how \fBsdiff\fR behaves.
190 \fB\fBLC_CTYPE\fR \fR
193 Determines how \fBsdiff\fR handles characters. When \fBLC_CTYPE\fR is set to a
194 valid value, \fBsdiff\fR can display and handle text and filenames containing
195 valid characters for that locale.
201 See \fBattributes\fR(5) for descriptions of the following attributes:
209 ATTRIBUTE TYPE ATTRIBUTE VALUE
217 \fBdiff\fR(1), \fBed\fR(1), \fBattributes\fR(5), \fBenviron\fR(5),