inidiff - generate the differences between two .ini files


inidiff [-q] [-V] [-i] [-M] [-c] [-o outfile] file1 file2


inidiff reads the two specified .ini files and prints the differences between the two.

The output is suitable for use with the iniedit program. Either of file1 or file2 may be "-", indicating standard input should be read.

The output consists of key names in brackets followed by the fields that have been added or changed in that key.

Keys are separated by blank lines.

Deleted keys are indicated by a minus at the end of the line containing the key name, while deleted fields are indicated by a minus after the field name (there is no equals or value after the field name).

New keys and fields are preceded by comments indicating they are new. Changed fields are preceded by comments indicating the previous value of the field.

All output lines end in a carriage return.

See iniedit for information about the format of .ini files and .ini patch files.

Terminology NOTE: The following naming convention is used here:

        [key] entry=value

Whereas in other documentation of INI files the naming convention is:

        [section] key=value



Suppresses the generation of comments indicating new keys and fields, and previous values of existing and deleted fields.


Prints the version number - the program then exits immediately.


Ignores case in values for comparison purposes (always does so for key names anyway).


Add ^M to output to support old (pre-NT) Windows/DOS systems.


Strip trailing inline comments after semicolon.

-o file

Allows an output file to be specified. "-" means write to stdout.


The only (known) problem with inidiff (and patch files) is that they don't handle changes to keys which have multiple fields with the same name. This kind of thing doesn't seem too common, so it hasn't been a problem.


inicat, iniedit, inifilter.


    Michael Rendell, Memorial University of Newfoundland


    Jeremy Squires <j.squires at>



    Michael Rendell, Memorial University of Newfoundland
    produced the first version of the Regutils package from which
    this package was derived.


Please report any bugs or feature requests to bug-app-inidiff-inifile at, or through the web interface at I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.


You can find documentation for this module with the perldoc command.

    perldoc App::IniDiff::IniFile

You can also look for information at:


This software is Copyright (c) 1998 Memorial University of Newfoundland

This is free software, licensed under:

The GNU General Public License, Version 3, July 2007