freebsd-skq/gnu/usr.bin/sdiff/sdiff.1
keramida 13f890f8ad Make minimal changes to point the users to the Texinfo documentation
for more detailed information about sdiff(1).  Hopefully this will
make it easier to find how `interactive merging' works with sdiff.

PR:		docs/30618
Submitted by:	mark@summersault.com
2002-12-14 23:58:49 +00:00

206 lines
3.9 KiB
Groff

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