O'Reilly logo

Mac OS X Tiger in a Nutshell by Jason McIntosh, Chuck Toporek, Chris Stone, Andy Lester

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

sdiff

Synopsis

sdiff [options] file1 file2

Compares two files to find differences and interactively merges them. Without the -o option, sdiff behaves like diff-side-by-side.

Options

-a, --text

Treat all files as text files. Useful for checking to see if binary files are identical.

-b, --ignore-space-change

Ignore repeating blanks and end-of-line blanks; treat successive blanks as one.

-B, --ignore-blank-lines

Ignore blank lines in files.

-d, --minimal

Ignore segments of numerous changes and output a smaller set of changes.

-E, --ignore-tab-expansion

Ignore changes based on expanding tabs.

-H, speed-large-files

Speed output of large files by scanning for scattered small changes; long stretches with many changes may not show up.

--help

Print brief usage message.

-i, --ignore-case

Ignore case in text comparison. Upper- and lowercase are considered the same.

-I regexp, --ignore-matching-lines= regexp

Ignore lines in files that match the regular expression regexp.

-l, --left-column

For two-column output (-y), show only left column of common lines.

-o outfile, --output= outfile

Send identical lines of file1 and file2 to outfile; print line differences and edit outfile by entering, when prompted, the following commands:

e

Edit an empty file.

e b

Edit both left and right columns.

e l

Edit left column.

e r

Edit right column.

l

Append left column to outfile.

q

Exit the editor.

r

Append right column to outfile.

s

Silent mode; don't print identical lines.

v

Turn off "silent mode."

-s, --suppress-common-lines ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required