OSDN Git Service

Import translated manuals from JM CVS Repository.
[linuxjm/jm.git] / manual / gnumaniak / original / man1 / sdiff.1
1 .\" You may copy, distribute and modify under the terms of the LDP General
2 .\" Public License as specified in the LICENSE file that comes with the
3 .\" gnumaniak distribution
4 .\"
5 .\" The author kindly requests that no comments regarding the "better"
6 .\" suitability or up-to-date notices of any info documentation alternative
7 .\" is added without contacting him first.
8 .\"
9 .\" (C) 2002 Ragnar Hojland Espinosa <ragnar@ragnar-hojland.com>
10 .\"
11 .\"     GNU sdiff man page
12 .\"     man pages are NOT obsolete!
13 .\"     <ragnar@ragnar-hojland.com>
14 .TH SDIFF 1 "October 2002" "GNU diff Utilities 2.8.1"
15 .SH NAME
16 \fBsdiff\fR \- find differences between two files and merge interactively
17 .SH SYNOPSIS
18 .B sdiff
19 [\fB\-abdilstBEHW\fR] [\fB\-o \fIOUTFILE\fR] [\fB\-w \fICOLUMNS\fR]
20 [\fB\-I \fIREGEXP\fR] [\fB\-\-diff\-program=\fIPROGRAM\fR]
21 [\fB\-\-expand-tabs\fR] [\fB\-ignore\-all\-space\fR]
22 [\fB\-ignore\-blank\-lines\fR] [\fB\-\-ignore\-case\fR]
23 [\fB\-\-ignore\-matching\-lines=\fIREGEXP\fR]
24 [\fB\-\-ignore\-space\-change\fR]
25 [\fB\-\-ignore\-tab\-expansion\fR]
26 [\fB\-\-left\-column\fR] [\fB\-\-minimal\fR]
27 [\fB\-\-output=\fIOUTFILE\fR] 
28 [\fB\-\-speed\-large\-files\fR]
29 [\fB\-\-strip\-trailing\-cr\fR]
30 [\fB\-\-supress\-common\-lines\fR] 
31 [\fB\-\-text\fR] [\fB\-\-width=\fICOLUMNS\fR]
32 .I FROMFILE TOFILE
33
34 .B sdiff
35 [\fB-v\fR] [\fB\-\-help\fR] [\fB\-\-version\fR]
36 .SH DESCRIPTION
37 .B sdiff
38 merges two files and interactively outputs the
39 results, to
40 .I OUTFILE
41 if \fB\-o\fR is specified, or producing a side-by-side difference if it's
42 not.
43
44 If
45 .I FROMFILE
46 is a directory and
47 .I TOFILE
48 is not,
49 .B sdiff
50 compares the file in
51 .I FROMFILE
52 whose file name is that of
53 .IR TOFILE ,
54 and vice versa.
55 .I FROMFILE
56 and
57 .I TOFILE
58 may not both be
59 directories.
60 You may not use
61 .RB ` \- '
62 as an input file.
63
64 Normally \fBsdiff\fP invokes \fBdiff\fP(1) to do its work, but you can
65 change the program by setting the \fBDIFF\fP environment variable to the
66 name of other program. You may also change the editor, setting the
67 \fBEDITOR\fR environment variable.
68 .SH OPTIONS
69 .TP
70 .B \-a, \-\-text
71 Treat all files as text and compare them line-by-line, even if they
72 do not appear to be text.
73 .TP
74 .B \-b, \-\-ignore\-space\-change
75 Ignore changes in amount of white space.
76 .TP
77 .B \-d, \-\-minimal
78 Change the algorithm to perhaps find a smaller set of changes.  This
79 makes
80 .B sdiff
81 slower (sometimes much slower).
82 .TP
83 .B \-i, \-\-ignore\-case
84 Ignore changes in case; consider upper- and lower-case to be the same.
85 .TP
86 .B \-l, \-\-left\-column
87 Print only the left column of two common lines.
88 .TP
89 .BI "\-o " OUTFILE ", \-\-output=" OUTFILE
90 Put merged output into
91 .IR  OUTFILE .
92 This option is required for merging.
93 .TP
94 .B \-s, \-\-suppress\-common\-lines
95 Do not print common lines.
96 .TP
97 .B \-t, \-\-expand\-tabs
98 Expand tabs to spaces in the output, to preserve the alignment of tabs
99 in the input files.
100 .TP
101 .BI "\-w " COLUMNS ", \-\-width=" COLUMNS
102 Use an output width of
103 .IR COLUMNS .
104 Note that for historical reasons, this option is
105 .B \-W
106 in
107 .BR diff (1).
108 .TP
109 .B \-B, \-\-ignore\-blank\-lines
110 Ignore changes that just insert or delete blank lines.
111 .TP
112 .B \-E, \-\-ignore\-tab\-expansion
113 Ignores changes in whitespace due to tab expansion.
114 .TP
115 .B \-H, \-\-speed\-large\-files
116 Use heuristics to speed handling of large files that have numerous
117 scattered small changes.
118 .TP
119 .BI "\-I " REGEXP ", \-\-ignore\-matching\-lines=" REGEXP
120 Ignore changes that just insert or delete lines that match
121 .IR REGEXP .
122 .TP
123 .B \-W
124 Ignore horizontal white space when comparing lines.
125 Note that for historical reasons, this option is
126 .B \-w
127 in
128 .BR diff (1).
129 .TP
130 .B \-\-diff\-program= \fIPROGRAM
131 Use an external \fIPROGRAM\fR, compatible with \fBdiff\fR, to compare files.
132 .TP
133 .B \-\-strip\-trailing\-cr
134 Strips trailing CRs.  Useful when processing output from systems that use
135 CRLF as end of line markers. 
136 .TP
137 .B "\-\-help"
138 Print a usage message on standard output and exit successfully.
139 .TP
140 .B \-v, \-\-version
141 Output the version number of
142 .BR diff3 .
143 .SH MERGING
144 Groups of common lines, with a blank gutter, are copied from the
145 first file to the output.  After each group of differing lines, \fBsdiff\fP
146 prompts with 
147 .RB ` % '
148 and pauses, waiting for one of the following commands.
149 .TP
150 .B e
151 Discard both versions.  Invoke a text editor on an empty temporary
152 file, then copy the resulting file to the output.
153 .TP 
154 .B eb
155 Concatenate the two versions, edit the result in a temporary file,
156 then copy the edited result to the output.
157 .TP
158 .B ed
159 Like 
160 .RB ` eb ',
161 except precede each version with a header
162 that shows what file and lines the version came from.
163 .TP     
164 .B el
165 Edit a copy of the left version, then copy the result to the output.
166 .TP
167 .B er
168 Edit a copy of the right version, then copy the result to the output.
169 .TP
170 .B l
171 Copy the left version to the output.
172 .TP
173 .B q
174 Quit.
175 .TP
176 .B p
177 Copy the right version to the output.
178 .TP
179 .B s
180 Silently copy common lines.
181 .TP
182 .B v
183 Verbosely copy common lines.  This is the default.
184
185 .SH DIAGNOSTICS
186 .B diff3
187 exits with one of the following values:
188 .TP
189 .B 0
190 \fBsdiff\fR was successful, no differences found.
191 .TP
192 .B 1
193 Some differences were found.
194 .TP
195 .B 2
196 Some error occurred.
197 .SH SEE ALSO
198 cmp(1), comm(1), diff(1), diff3(1).
199 .SH NOTES
200 Report bugs to bug-gnu-utils@gnu.org.
201 Page updated by Ragnar Hojland Espinosa <ragnar@ragnar-hojland.com>