Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

sdiff(1) [netbsd man page]

SDIFF(1)						    BSD General Commands Manual 						  SDIFF(1)

NAME
sdiff -- side-by-side diff SYNOPSIS
sdiff [-abdilstW] [-I regexp] [-o outfile] [-w width] file1 file2 DESCRIPTION
sdiff displays two files side by side, with any differences between the two highlighted as follows: new lines are marked with '>'; deleted lines are marked with '<'; and changed lines are marked with '|'. sdiff can also be used to interactively merge two files, prompting at each set of differences. See the -o option for an explanation. The options are: -l Only print the left column for identical lines. -o outfile Interactively merge file1 and file2 into outfile. In this mode, the user is prompted for each set of differences. See EDITOR and VISUAL, below, for details of which editor, if any, is invoked. The commands are as follows: l Choose left set of diffs. r Choose right set of diffs. s Silent mode - identical lines are not printed. v Verbose mode - identical lines are printed. e Start editing an empty file, which will be merged into outfile upon exiting the editor. e l Start editing file with left set of diffs. e r Start editing file with right set of diffs. e b Start editing file with both sets of diffs. q Quit sdiff. -s Skip identical lines. -w width Print a maximum of width characters on each line. The default is 130 characters. Options passed to diff(1) are: -a Treat file1 and file2 as text files. -b Ignore trailing blank spaces. -d Minimize diff size. -I regexp Ignore line changes matching regexp. All lines in the change must match regexp for the change to be ignored. -i Do a case-insensitive comparison. -t Expand tabs to spaces. -W Ignore all spaces (the -w flag is passed to diff(1)). ENVIRONMENT
EDITOR, VISUAL Specifies an editor to use with the -o option. If both EDITOR and VISUAL are set, VISUAL takes precedence. If neither EDITOR nor VISUAL are set, the default is vi(1). TMPDIR Specifies a directory for temporary files to be created. The default is /tmp. SEE ALSO
diff(1), diff3(1), vi(1), re_format(7) AUTHORS
sdiff was written from scratch for the public domain by Ray Lai <ray@cyth.net>. CAVEATS
Although undocumented, sdiff supports all options supported by GNU sdiff. Some options require GNU diff. Tabs are treated as anywhere from one to eight characters wide, depending on the current column. Terminals that treat tabs as eight charac- ters wide will look best. BUGS
sdiff may not work with binary data. BSD
February 21, 2007 BSD

Check Out this Related Man Page

SDIFF(1)							   User Commands							  SDIFF(1)

NAME
sdiff - side-by-side merge of file differences SYNOPSIS
sdiff [OPTION]... FILE1 FILE2 DESCRIPTION
Side-by-side merge of file differences. -o FILE --output=FILE Operate interactively, sending output to FILE. -i --ignore-case Consider upper- and lower-case to be the same. -E --ignore-tab-expansion Ignore changes due to tab expansion. -b --ignore-space-change Ignore changes in the amount of white space. -W --ignore-all-space Ignore all white space. -B --ignore-blank-lines Ignore changes whose lines are all blank. -I RE --ignore-matching-lines=RE Ignore changes whose lines all match RE. --strip-trailing-cr Strip trailing carriage return on input. -a --text Treat all files as text. -w NUM --width=NUM Output at most NUM (default 130) columns per line. -l --left-column Output only the left column of common lines. -s --suppress-common-lines Do not output common lines. -t --expand-tabs Expand tabs to spaces in output. -d --minimal Try hard to find a smaller set of changes. -H --speed-large-files Assume large files and many scattered small changes. --diff-program=PROGRAM Use PROGRAM to compare files. -v --version Output version info. --help Output this help. If a FILE is `-', read standard input. AUTHOR
Written by Thomas Lord. REPORTING BUGS
Report bugs to <bug-gnu-utils@gnu.org>. COPYRIGHT
Copyright (C) 2002 Free Software Foundation, Inc. This program comes with NO WARRANTY, to the extent permitted by law. You may redistribute copies of this program under the terms of the GNU General Public License. For more information about these matters, see the file named COPYING. SEE ALSO
The full documentation for sdiff is maintained as a Texinfo manual. If the info and sdiff programs are properly installed at your site, the command info diff should give you access to the complete manual. diffutils 2.8.1 April 2002 SDIFF(1)
Man Page