- command line tools to read and write ini files easily and quickly (i.e. in scripts).
## **Documentation for ini-tools** ---
-
buildmsg
- Theini-tools
Makefile
uses thebuildmsg
script from quantum-utils.
In order to build this project, you must havebuildmsg
in your $PATH. -
A modified version of minIni 1.2b is used to process the ini files. It is included in the
src/
directory. -
Note: the source of minIni has been modified slightly; replacing the src/minIni.* files may break functionality.
first, make sure buildmsg
is installed, or remove the buildmsg
lines from the Makefile
.
-
make minIni
to build the minIni library - builds src/minIni.o -
run any of: +
make all
+nake ini-read
+nake ini-write
-
The
Makefile
will automatically generatesrc/build-date.h
when building any ini-tools project, which adds the build date to the--version
output. -
By default, the compiled binaries will be output to
build/
. -
make install
moves the compiled binaries toHOME/scripts
, by default. Either add this path to your$PATH
or modify the Makefile to install to another location. -
Specify the ini filename as "-" to read/write to stdin/out.
test.ini
[Last]
key1=yes
newkey2=myvalue
key3=test value
[First]
newkey3=myvalue
ini-read Last key3 test.ini
| read key3 value from section Lastini-read --dump test.ini
| dump ini contents from test.iniini-read --dump test.ini Last
| dump section Last keys from test.inicat test.ini | ini-read --dump -
| dump ini contents, reading ini file from stdin
ini-write Last key4 "new key" test.ini
| write key4 with a value of "new key" to section Last.