Purpose
udiff is a script that can be used to show the differences between files
or directories. It is an URL-enabled version of the diff system command.
Via ll.url and ll.orasql udiff supports ssh and
oracle URLs.
Options
udiff supports the following options:
url1The first URL to be compared (Note that a trailing
/is required for directories).url2The second URL to be compared (Note that a trailing
/is required for directories).--encoding(encoding name)The encoding name to use for decoding files (default
utf-8).--errors(encoding error handler name)Encoding error handling to use for reading text files (e.g.
strict,replace,ignore,xmlcharrefreplaceorbackslashreplace; defaultreplace).--color:yes,noorautoShould the output of
udiffbe colored? The defaultautouses coloring ifstdoutsupports it.-v,--verbose(false,no,0,true,yesor1)Prints which files are compare before the comparison. Without
-v1udiffwill be silent as long as no differences are detected.-r,--recursive(false,no,0,true,yesor1)Compare directories recursively.
-i,--include(pattern(s))Only compares files whose name matches one of the specified patterns.
-e,--exclude(pattern(s))Don't compares files whose name matches one of the specified patterns.
--enterdir(pattern(s))Only enter directories whose name matches one of the specified patterns.
--skipdir(pattern(s))Don't enter directories whose name matches one of the specified patterns.
-n,--context(integer)How many lines of copied context to show (default 2).
-b,--blank(literal,trail,lead,bothorcollapse)How to compare whitespace within lines.
literalcompares whitespace literally.trailignores differences in trailing whitespace,leadignores differences in leading whitespace,bothignores both leading and trailing whitespace andcollapsecollapses whitespace into a single space before comparing lines.
Examples
Compare two files:
$ udiff foo.txt bar.txt
Recursively compare two directories, but skip the .git directory:
$ udiff foo/ bar/ -r --skipdir=.git
Recursively compare two Oracle schemas:
$ udiff oracle://user1:pwd@database1 oracle://user2:pwd@database2 -r