SDIFF(1)

NAME
sdiff - print file differences side-by-side

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:

    l | Write the lines of the left (first) file to name.
    r | Write the lines of the right (second) file to name.
    s | Do not print equal lines to standard output.
    v | Turn printing of equal lines on.
    e l | Invoke the editor on the lines of the left file and append the result to name.
    e r | Invoke the editor on the lines of the right file.
    e b | Concatenate the lines of both files and invoke the editor on the result.
    e | Invoke the editor with an empty file.
    q | Quit 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)