|
|
sdiff
You can use the `sdiff' command to merge two files interactively.
(Show differences)
SYNTAX
sdiff -o OUTFILE OPTIONS... FROM-FILE TO-FILE
OPTIONS
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.
Multiple single letter options (unless they take an argument)
can be combined into a single command line argument.
`-a'
Treat all files as text and compare them line-by-line, even if they
do not appear to be text.
`-b'
Ignore changes in amount of white space.
`-B'
Ignore changes that just insert or delete blank lines.
`-d'
Change the algorithm to perhaps find a smaller set of changes.
This makes `sdiff' slower (sometimes much slower).
`-H'
Use heuristics to speed handling of large files that have numerous
scattered small changes.
`--expand-tabs'
Expand tabs to spaces in the output, to preserve the alignment of
tabs in the input files.
`-i'
Ignore changes in case; consider upper- and lower-case to be the
same.
`-I REGEXP'
Ignore changes that just insert or delete lines that match REGEXP.
`--ignore-all-space'
Ignore white space when comparing lines.
`--ignore-blank-lines'
Ignore changes that just insert or delete blank lines.
`--ignore-case'
Ignore changes in case; consider upper- and lower-case to be the
same.
`--ignore-matching-lines=REGEXP'
Ignore changes that just insert or delete lines that match REGEXP.
`--ignore-space-change'
Ignore changes in amount of white space.
`-l'
`--left-column'
Print only the left column of two common lines.
`--minimal'
Change the algorithm to perhaps find a smaller set of changes.
This makes `sdiff' slower (sometimes much slower).
`-o FILE'
`--output=FILE'
Put merged output into FILE. This option is required for merging.
`-s'
`--suppress-common-lines'
Do not print common lines.
`--speed-large-files'
Use heuristics to speed handling of large files that have numerous
scattered small changes.
`-t'
Expand tabs to spaces in the output, to preserve the alignment of
tabs in the input files.
`--text'
Treat all files as text and compare them line-by-line, even if they
do not appear to be text.
`-v'
`--version'
Output the version number of `sdiff'.
`-w COLUMNS'
`--width=COLUMNS'
Use an output width of COLUMNS.
Note that for historical reasons, this option is `-W' in `diff',
`-w' in `sdiff'.
`-W'
Ignore horizontal white space when comparing lines.
Note that for historical reasons, this option is `-w' in
`diff', `-W' in `sdiff'.
Related commands:
cmp - Compare two files
diff - Display the differences between two files
diff3 - Show differences among three files
Equivalent Windows NT commands:
COMP - Compare two files and display any characters
which do NOT match
FC - Compare two files and display any LINES which
do not match
FIND - Search for a text string in a file
FINDSTR - Search for strings in files
MUNGE - Find and Replace text within file(s)
WINDIFF - GUI, Win 2K Resource Kit