compare two HTML files and display differences 



htdiff [-b| -d| -g| -m] [-x] [-B URL] [-G URL] [-T title] file1 file2


The htdiff command tries to determine the minimal set of differences between two HTML files. Various different output formats are available. In all cases, htdiff writes a valid HTML page to standard out. The page has a title indicating the operation and files compared.


htdiff accepts the following options to control the output format; they are mutually exclusive:


is the same as -d output, but with the addition of the -b option being passed to the diff command internally, to ignore differences between blank spaces.


produces standard diff output. The HTML output contains raw lines of differences between the two files; that is, it shows the actual HTML lines from the original files.


produces quiet output. The output is the full HTML page, with markup indicating the differences. Each difference is indicated with a small GIF image and a color change for the actual differing text.


produces noisy output. Same as -g, but instead of using a GIF image to mark changes, they are marked with ADD() and DEL() around changed parts of the output.

The -g and -m output formats show differences in text, but do not adequately show changes which are only to the HTML tags. A marker appears to indicate the change, but since no visible text has changed, you cannot determine the change without examining the -d output.

In addition to the options controlling the output format, htdiff accepts the following options:


adds a <BASE HREF="URL"> tag to the HTML output for the -g and -m options.


indicates the URL of the GIF image which is used as the image marker in -g output.

-T title 

specifies the title to appear in the <TITLE> area of the HTML output. If not given, it defaults to diff file1 file2.


Processes the input as XML rather HTML. The case of the tags is not changed and XML preprocessor directives (<?) are recognized.



Are the files containing the GIF images for indicating new and deleted text, respectively.


Possible exit status values are:


Successful completion.


An error occurred.


PTC MKS Toolkit for System Administrators
PTC MKS Toolkit for Developers
PTC MKS Toolkit for Interoperability
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition


diff, htsplit

PTC MKS Toolkit 10.4 Documentation Build 39.