*** UNIX MANUAL PAGE BROWSER ***

A Nergahak database for man pages research.

Navigation

Directory Browser

1Browse 4.4BSD4.4BSD
1Browse Digital UNIXDigital UNIX 4.0e
1Browse FreeBSDFreeBSD 14.3
1Browse MINIXMINIX 3.4.0rc6-d5e4fc0
1Browse NetBSDNetBSD 10.1
1Browse OpenBSDOpenBSD 7.7
1Browse UNIX v7Version 7 UNIX
1Browse UNIX v10Version 10 UNIX

Manual Page Search

Manual Page Result

0 Command: sdiff | Section: 1 | Source: OpenBSD | File: sdiff.1
SDIFF(1) FreeBSD 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 | 1 Choose left set of diffs. r | 2 Choose right set of diffs. b l | b 1 Choose both, left set of diffs first. b r | b 2 Choose both, right set of diffs first. 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. EXIT STATUS The sdiff utility exits with one of the following values: 0 No differences were found. 1 Differences were found. >1 An error occurred. SEE ALSO cmp(1), diff(1), diff3(1), vi(1), re_format(7) HISTORY The sdiff command first appeared in AT&T System III UNIX and was reimplemented for OpenBSD 3.9. AUTHORS sdiff was written from scratch for the public domain by Ray Lai <[email protected]>. CAVEATS Although undocumented, sdiff supports most long options supported by GNU sdiff, though some 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 characters wide will look best. BUGS sdiff may not work with binary data. FreeBSD 14.1-RELEASE-p8 February 26, 2025 FreeBSD 14.1-RELEASE-p8

Navigation Options