cvsdist 70d82c0
.TH SDIFF 1 "22sep1993" "GNU Tools" "GNU Tools"
cvsdist 70d82c0
.SH NAME
cvsdist 70d82c0
sdiff \- find differences between two files and merge interactively
cvsdist 70d82c0
.SH SYNOPSIS
cvsdist 70d82c0
.B sdiff
cvsdist 70d82c0
.B -o
cvsdist 70d82c0
outfile [options] from-file to-file
cvsdist 70d82c0
.SH DESCRIPTION
cvsdist 70d82c0
The
cvsdist 70d82c0
.I sdiff
cvsdist 70d82c0
command merges two files and interactively outputs the
cvsdist 70d82c0
results to
cvsdist 70d82c0
.IR outfile .
cvsdist 70d82c0
cvsdist 70d82c0
If
cvsdist 70d82c0
.I from-file
cvsdist 70d82c0
is a directory and
cvsdist 70d82c0
.I to-file
cvsdist 70d82c0
is not,
cvsdist 70d82c0
.I sdiff
cvsdist 70d82c0
compares the file in
cvsdist 70d82c0
.I from-file
cvsdist 70d82c0
whose file name is that of
cvsdist 70d82c0
.IR to-file ,
cvsdist 70d82c0
and vice versa.
cvsdist 70d82c0
.I from-file
cvsdist 70d82c0
and
cvsdist 70d82c0
.I to-file
cvsdist 70d82c0
may not both be
cvsdist 70d82c0
directories.
cvsdist 70d82c0
cvsdist 70d82c0
.I sdiff
cvsdist 70d82c0
options begin with
cvsdist 70d82c0
.BR \- ,
cvsdist 70d82c0
so normally
cvsdist 70d82c0
.I from-file
cvsdist 70d82c0
and
cvsdist 70d82c0
.I to-file
cvsdist 70d82c0
may not begin with
cvsdist 70d82c0
.BR \- .
cvsdist 70d82c0
However,
cvsdist 70d82c0
.B \-\-
cvsdist 70d82c0
as an
cvsdist 70d82c0
argument by itself treats the remaining arguments as file names even if
cvsdist 70d82c0
they begin with
cvsdist 70d82c0
.BR \- .
cvsdist 70d82c0
You may not use
cvsdist 70d82c0
.B \-
cvsdist 70d82c0
as an input file.
cvsdist 70d82c0
cvsdist 70d82c0
.I sdiff
cvsdist 70d82c0
without
cvsdist 70d82c0
.B \-o
cvsdist 70d82c0
(or
cvsdist 70d82c0
.BR \-\-output )
cvsdist 70d82c0
produces a
cvsdist 70d82c0
side-by-side difference.  This usage is obsolete; use
cvsdist 70d82c0
.B "diff \-\-side\-by\-side"
cvsdist 70d82c0
instead.
cvsdist 70d82c0
.SS Options
cvsdist 70d82c0
Below is a summary of all of the options that GNU
cvsdist 70d82c0
.I sdiff
cvsdist 70d82c0
accepts.
cvsdist 70d82c0
Each option has two equivalent names, one of which is a single
cvsdist 70d82c0
letter preceded by
cvsdist 70d82c0
.BR \- ,
cvsdist 70d82c0
and the other of which is a long name
cvsdist 70d82c0
preceded by
cvsdist 70d82c0
.BR \-\- .
cvsdist 70d82c0
Multiple single letter options (unless they take
cvsdist 70d82c0
an argument) can be combined into a single command line argument.  Long
cvsdist 70d82c0
named options can be abbreviated to any unique prefix of their name.
cvsdist 70d82c0
.TP
cvsdist 70d82c0
.B \-a
cvsdist 70d82c0
Treat all files as text and compare them line-by-line, even if they
cvsdist 70d82c0
do not appear to be text.
cvsdist 70d82c0
.TP
cvsdist 70d82c0
.B \-b
cvsdist 70d82c0
Ignore changes in amount of white space.
cvsdist 70d82c0
.TP
cvsdist 70d82c0
.B \-B
cvsdist 70d82c0
Ignore changes that just insert or delete blank lines.
cvsdist 70d82c0
.TP
cvsdist 70d82c0
.B \-d
cvsdist 70d82c0
Change the algorithm to perhaps find a smaller set of changes.  This
cvsdist 70d82c0
makes
cvsdist 70d82c0
.I sdiff
cvsdist 70d82c0
slower (sometimes much slower).
cvsdist 70d82c0
.TP
cvsdist 70d82c0
.B \-H
cvsdist 70d82c0
Use heuristics to speed handling of large files that have numerous
cvsdist 70d82c0
scattered small changes.
cvsdist 70d82c0
.TP
cvsdist 70d82c0
.B \-\-expand\-tabs
cvsdist 70d82c0
Expand tabs to spaces in the output, to preserve the alignment of tabs
cvsdist 70d82c0
in the input files.
cvsdist 70d82c0
.TP
cvsdist 70d82c0
.B \-i
cvsdist 70d82c0
Ignore changes in case; consider upper- and lower-case to be the same.
cvsdist 70d82c0
.TP
cvsdist 70d82c0
.BI "\-I " regexp
cvsdist 70d82c0
Ignore changes that just insert or delete lines that match
cvsdist 70d82c0
.IR regexp .
cvsdist 70d82c0
.TP
cvsdist 70d82c0
.B \-\-ignore\-all\-space
cvsdist 70d82c0
Ignore white space when comparing lines.
cvsdist 70d82c0
.TP
cvsdist 70d82c0
.B \-\-ignore\-blank\-lines
cvsdist 70d82c0
Ignore changes that just insert or delete blank lines.
cvsdist 70d82c0
.TP
cvsdist 70d82c0
.B \-\-ignore\-case
cvsdist 70d82c0
Ignore changes in case; consider upper- and lower-case to be the same.
cvsdist 70d82c0
.TP
cvsdist 70d82c0
.BI \-\-ignore\-matching\-lines= regexp
cvsdist 70d82c0
Ignore changes that just insert or delete lines that match
cvsdist 70d82c0
.IR regexp .
cvsdist 70d82c0
.TP
cvsdist 70d82c0
.B \-\-ignore\-space\-change
cvsdist 70d82c0
Ignore changes in amount of white space.
cvsdist 70d82c0
.TP
cvsdist 70d82c0
.B \-l
cvsdist 70d82c0
.br
cvsdist 70d82c0
.ns
cvsdist 70d82c0
.TP
cvsdist 70d82c0
.B \-\-left\-column
cvsdist 70d82c0
Print only the left column of two common lines.
cvsdist 70d82c0
.TP
cvsdist 70d82c0
.B \-\-minimal
cvsdist 70d82c0
Change the algorithm to perhaps find a smaller set of changes.  This
cvsdist 70d82c0
makes
cvsdist 70d82c0
.I sdiff
cvsdist 70d82c0
slower (sometimes much slower).
cvsdist 70d82c0
.TP
cvsdist 70d82c0
.BI "\-o " file
cvsdist 70d82c0
.br
cvsdist 70d82c0
.ns
cvsdist 70d82c0
.TP
cvsdist 70d82c0
.BI \-\-output= file
cvsdist 70d82c0
Put merged output into
cvsdist 70d82c0
.IR file .
cvsdist 70d82c0
This option is required for merging.
cvsdist 70d82c0
.TP
cvsdist 70d82c0
.B \-s
cvsdist 70d82c0
.br
cvsdist 70d82c0
.ns
cvsdist 70d82c0
.TP
cvsdist 70d82c0
.B \-\-suppress\-common\-lines
cvsdist 70d82c0
Do not print common lines.
cvsdist 70d82c0
.TP
cvsdist 70d82c0
.B \-\-speed\-large\-files
cvsdist 70d82c0
Use heuristics to speed handling of large files that have numerous
cvsdist 70d82c0
scattered small changes.
cvsdist 70d82c0
.TP
cvsdist 70d82c0
.B \-t
cvsdist 70d82c0
Expand tabs to spaces in the output, to preserve the alignment of tabs
cvsdist 70d82c0
in the input files.
cvsdist 70d82c0
.TP
cvsdist 70d82c0
.B \-\-text
cvsdist 70d82c0
Treat all files as text and compare them line-by-line, even if they
cvsdist 70d82c0
do not appear to be text.
cvsdist 70d82c0
.TP
cvsdist 70d82c0
.B \-v
cvsdist 70d82c0
.br
cvsdist 70d82c0
.ns
cvsdist 70d82c0
.TP
cvsdist 70d82c0
.B \-\-version
cvsdist 70d82c0
Output the version number of
cvsdist 70d82c0
.IR sdiff .
cvsdist 70d82c0
.TP
cvsdist 70d82c0
.BI "\-w " columns
cvsdist 70d82c0
.br
cvsdist 70d82c0
.ns
cvsdist 70d82c0
.TP
cvsdist 70d82c0
.BI \-\-width= columns
cvsdist 70d82c0
Use an output width of
cvsdist 70d82c0
.IR columns .
cvsdist 70d82c0
Note that for historical reasons, this option is
cvsdist 70d82c0
.B \-W
cvsdist 70d82c0
in
cvsdist 70d82c0
.IR diff ,
cvsdist 70d82c0
.B \-w
cvsdist 70d82c0
in
cvsdist 70d82c0
.IR sdiff .
cvsdist 70d82c0
.TP
cvsdist 70d82c0
.B \-W
cvsdist 70d82c0
Ignore horizontal white space when comparing lines.
cvsdist 70d82c0
Note that for historical reasons, this option is
cvsdist 70d82c0
.B \-w
cvsdist 70d82c0
in
cvsdist 70d82c0
.IR diff ,
cvsdist 70d82c0
.B \-W
cvsdist 70d82c0
in
cvsdist 70d82c0
.IR sdiff .
cvsdist 70d82c0
.SH SEE ALSO
cvsdist 70d82c0
cmp(1), comm(1), diff(1), diff3(1).
cvsdist 70d82c0
.SH DIAGNOSTICS
cvsdist 70d82c0
An exit status of 0 means no differences were found, 1 means some
cvsdist 70d82c0
differences were found, and 2 means trouble.