Table of Contents

Linux Commands Cheat Sheet

sdiff - How to use sdiff command in Linux with examples



man sdiff

       -s
       --suppress-common-lines
              Do not print common lines.

       -w columns
       --width=columns
              Use an output width of columns.  Note that for historical reasons, this option is -W in diff, -w in sdiff.


Example

$ cat a.txt
1
2
3
4
5
$ cat b.txt
1
2
3a
4
5
$
$ sdiff -s -w 200 a.txt b.txt
3                                                             | 3a
$
$ sdiff  -w 200  a.txt b.txt
1                                                               1
2                                                               2
3                                                             | 3a
4                                                               4
5                                                               5







Linux Commands Cheat Sheet