- FILE FORMATS
- SEE ALSO
- LICENSE AND COPYRIGHT
iniedit - edit (or patch) a
iniedit [-V] -f file -i file [-o file]
iniedit edits or patches the
.ini file specified by the -f option using the patch in the file indicated by the -i option.
If the -o option is used, the result is written the specified file, otherwise the original file is over-written with the result.
The patch file basically lists the keys and fields to add, remove or change - it is typically the result of running inidiff.
- -f file
.inifile that is to be patched. A "-" means read the file from standard input.
- -i file
Specifies the file containing the
.inipatch (usually generated by inidiff). A "-" means the patch should be read from standard input.
- -o file
Specifies the file where the result of the edit should be written. A "-" means the patch should be written to standard output. If this option is not specified, the original file is overwritten (if the original file was read from standard input, the result is written to standard output).
Prints the version number - the program then exits immediately.
Disclaimer: this is my understanding of
.ini, gained from looking at a few files, and may be incorrect.
Terminology NOTE: The following naming convention is used here:
Whereas in other documentation of INI files the naming convention is:
.ini file looks like this:
; A comment [firstkey] field=value ; More comments foo=bar [Another key name] A field=The value moreFields="values and ; stuff"
and so on.
.ini files consist of a number of keys, each key has a number of fields, and each field has a value. Key names are inclosed in brackets and appear on a line by themselves - they may contain pretty much any character except brackets. Keys can appear in any order in the file, but no two keys should have the same name.
Field names and their values are separated by an equals. Field names within a key are usually, but not always, unique. Double quotes are (somewhat) special in field names and values: they can be used to quote characters that would otherwise not be allowed (e.g., equals and semi-colon).
Quotes should be balanced (though I've seen some
.ini files with a single quote in the value - check your HP printer
Blank lines are completely ignored, though they are typically used to separate keys.
.ini files begin with a semi-colon and go the the end of the line.
Comments may be on lines by themselves or they may appear after a key name or after a field
A semi-colon inside the brackets of a key name is not considered a comment.
.ini patch file is mostly the same as an
.ini file with the following differences:
A minus after a key name (outside the brackets) indicates the key is to be deleted.
A minus after a field name indicates the field is to be deleted (the field has no equals and no value).
Key names can be repeated - the changes contained in the keys are combined; the last change mentioned wins.
Michael Rendell, Memorial University of Newfoundland
Jeremy Squires <j.squires at computer.org>
The source for this package is available here:
Michael Rendell, Memorial University of Newfoundland produced the first version of the Regutils package from which this package was derived.
It is still available from:
Please report any bugs or feature requests to
bug-app-inidiff-inifile at rt.cpan.org, or through the web interface at https://rt.cpan.org/NoAuth/ReportBug.html?Queue=App-IniDiff-IniFile. 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.
You can also look for information at:
RT: CPAN's request tracker (report bugs here)
AnnoCPAN: Annotated CPAN documentation
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