The sdiff command merges two files and interactively outputs the
results. Its arguments are as follows:
sdiff -o outfileoptions... from-fileto-file
This merges from-file with to-file, with output to outfile.
If from-file is a directory and to-file is not, sdiff
compares the file in from-file whose file name is that of to-file,
and vice versa. from-file and to-file may not both be
directories.
sdiff options begin with `-', so normally from-file
and to-file may not begin with `-'. However, `--' as an
argument by itself treats the remaining arguments as file names even if
they begin with `-'. You may not use `-' as an input file.
An exit status of 0 means no differences were found, 1 means some
differences were found, and 2 means trouble.
sdiff without `-o' (or `--output') produces a
side-by-side difference. This usage is obsolete; use `diff
--side-by-side' instead.
Below is a summary of all of the options that GNU sdiff accepts.
Each option has two equivalent names, one of which is a single
letter preceded by `-', and the other of which is a long name
preceded by `--'. 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.
Change the algorithm to perhaps find a smaller set of changes. This
makes sdiff slower (sometimes much slower). See section diff Performance Tradeoffs.
`-H'
Use heuristics to speed handling of large files that have numerous
scattered small changes. See section diff Performance Tradeoffs.
`--expand-tabs'
Expand tabs to spaces in the output, to preserve the alignment of tabs
in the input files. See section Preserving Tabstop Alignment.
`-i'
Ignore changes in case; consider upper- and lower-case to be the same.
See section Suppressing Case Differences.
Change the algorithm to perhaps find a smaller set of changes. This
makes sdiff slower (sometimes much slower). See section diff Performance Tradeoffs.
`-o file'
`--output=file'
Put merged output into file. This option is required for merging.
Use an output width of columns. See section Controlling Side by Side Format.
Note that for historical reasons, this option is `-W' in diff,
`-w' in sdiff.