SDIFF(1) COMMAND REFERENCE SDIFF(1) NAME sdiff - side-by-side difference program SYNOPSIS sdiff [ -w n ] [ -l ] [ -s ] [ -o output ] filename1 filename2 DESCRIPTION Sdiff uses the output of diff(1) to produce a side-by-side listing of two files indicating those lines that are different. Each line of the two files is printed with a blank gutter between them if the lines are identical, a < in the gutter if the line only exists in filename1, a > in the gutter if the line only exists in filename2, and a | (pipe) for lines that are different. (See EXAMPLES Section.) OPTIONS -l Only print the left side of any lines that are identical. -o output Use the next argument, output, as the name of a third file that is created as a user-controlled merging of filename1 and filename2. Identical lines of filename1 and filename2 are copied to output. Sets of differences, as produced by diff(1), are printed where a set of differences share a common gutter character. After printing each set of differences, sdiff prompts the user with a % and waits for one of the following user-typed commands: l Append the left column to the output file r Append the right column to the output file s Turn on silent mode; do not print identical lines v Turn off silent mode e l Call the editor with the left column e r Call the editor with the right column e b Call the editor with the concatenation of left and right e Call the editor with a zero length file q Exit from the program Printed 4/6/89 1
SDIFF(1) COMMAND REFERENCE SDIFF(1) On exit from the editor, the resulting file is concatenated on the end of the output file. The editor used will be determined by the value contained in the environment variable EDIT. If it has not been set, ed is used by default. -s Do not print identical lines. -w n Use the next argument, n, as the width of the output line. The default line length is 130 characters. EXAMPLES Given the file foo.1 composed of the letters x, a, b, c, and d on individual lines, and the file foo.2 similiarly composed of the letters y, a, d, and c, the following results will ocurr: sdiff foo.1 foo.2 x | y a a b < c < d d > c VARIABLES EDIT The editor to be used with the -o option. RETURN VALUE [NO_ERRS] Command completed without error. [USAGE] Incorrect command line syntax. Execution terminated. [NP_WARN] An error warranting a warning message occurred. Execution continues. [P_ERR] A system error occurred. Execution terminated. See intro(2) for more information on system errors. CAVEATS Sdiff executes diff(1) in order to process the input files. If a line coming from diff is longer than 200 characters, an error message is printed and sdiff exits. SEE ALSO diff(1), ed(1), and sh(1sh). Printed 4/6/89 2
%%index%% na:264,91; sy:355,343; de:698,689; op:1387,1547;3270,558; ex:3828,550; va:4378,183; rv:4561,554; ca:5115,407; se:5522,141; %%index%%000000000156