Cisco Support Tools 1.0 User Guide How to Use the Diff Utility 219
n1 a n3,n4
n1,n2 d n3
n1,n2 c n3,n4
where 'a' means: add lines n3 thru n4 from newfile at location n1 in newfile; 'd'
means: delete lines n1 thru n2 from newfile, next line is n3 in newfile; and 'c'
means: change lines n1 thru n2 in newfile to lines n3 thru n4 in newfile Identical
pairs where n1=n2 or n3=n4 are abbreviated as a single number. Following each of
the [adc] lines comes each of the lines effected. Lines preceded by '<' are from
oldfile, those preceded by '>' are from newfile.
Command Line Options
The options for Diff are:
-b: Ignore trailing whitespace and treat sequences of embedded whitespace as being
equal.
-i: Ignore leading whitespace.
-d: Treat files as if they were binary, only reporting if they are different.
-t: Treat files as if they were text, even if default autodetection claims they are
binary.
-v: Report on each file that it processes, not just the ones with differences.
-o: Colorize output with the default colors (black, white, light cyan, and yellow), just
as '-O 0fbe' would.
-O <colors>: Colorize output with the specified single-character hex colors:
background, normal text, old text, and new text. The colors are: black = 0, blue = 1,
green = 2, cyan = 3, red = 4, magenta = 5, brown = 6, lightgray = 7, darkgray = 8,
lightblue = 9, lightgreen = A, lightcyan = B, lightred = C, lightmagenta = D, yellow
= E, white = F.
-?: Display program description.
Note: If the environment variable DIFF exists, its value is used to establish default
options.
Note: You can override an option that was specified in the environment variable by
following the option with a minus '-' sign. For example, to turn off the -b option,
specify -b-.
See Also
For related information, see: