SDIFF (1)

NAME

sdiff - print file differences side-by-side

CONTENTS

Synopsis
Description
Environment Variables
See Also

SYNOPSIS

sdiff [-ls] [-o name] [-w width] file1 file2

DESCRIPTION

sdiff presents the lines of file1 and file2 side-by-side in two columns. Lines that are equal in both files are separated by blanks; lines that differ are separated by one of the following characters:

<the line is in file1 only
|the line differs in file1 and file2
>the line is in file2 only.

This might look as

only in file1        < 
in both files           in both files
this line            |  is different
                     >  only in file2
also in both files      also in both files

The behavior of sdiff can be influenced with the following options:
-l Print the first column only for lines equal in both files.
-s Omit equal lines in output.
-w width Set the width of output (both lines and separators added) to width; the default is 130. Long lines are truncated to fit within this space.
-o name Generate a merged version of both input files in the file name in addition to normal output. Lines that are equal are written to name; for each set of different lines, the prompt '%' is printed and the user may then choose the action by typing one of the following commands:

lWrite the lines of the left (first) file to name.
rWrite the lines of the right (second) file to name.
sDo not print equal lines to standard output.
vTurn printing of equal lines on.
e lInvoke the editor on the lines of the left file and append the result to name.
e rInvoke the editor on the lines of the right file.
e bConcatenate the lines of both files and invoke the editor on the result.
eInvoke the editor with an empty file.
qQuit sdiff and do not write further lines to name.

ENVIRONMENT VARIABLES

LANG, LC_ALL
  See locale(7).
LC_CTYPE Determines the mapping of bytes to characters and the width of characters.

SEE ALSO

diff(1), ed(1)


Heirloom Toolchest SDIFF (1) 4/30/03
Generated by a modified version of manServer 1.07 from sdiff.1 using man macros with tbl support.