Command line interface for reading (and optionally editing) .INI files.


inied [ --section section ] [ --key key ] [ --print | --print-raw --append value |
      --change value | --edit value ] [ --pretty-print ] [ --trim ] [ --no-comments ]
      [ --in-place ] file
--section section Section to show or replace. If not specified, all sections are matched.
-key key Key to show or replace. If not specified, all keys within section are matched.
--print Print value only. If value is enclosed in quotes, those will be removed upon printing.
--print-raw Print value exactly how it's defined in file.
--delete Matched value will be deleted. If --key is not specified, the whole section will be removed.
--append value Value to append onto a specified section. This will be done unconditionally, i.e. it might create duplicate values.
--change value Value of entry will be changed if it exists. If entry is not found in specified section, no change will be done.
--edit value Value will be edited in specified section. If value does not exist, one will be appended.
--pretty-print Output file will be made to look nicer. All lines that are not recognized as section, key/value entry, or comment will be removed.
--trim Extra spaces before and after section name, key, or value will be removed.
--no-comments Output file will not contain any comments.
--in-place All changes will be done directly on file instead of outputing them to standard out.


inied --section mysqld --key key_buffer --print  examples/my.cnf
To show just the value, we need to specify --section, --key, and --print.
inied --section mysqld --key key_buffer --edit 200M  examples/my.cnf
To edit key to a particular value, you need to specify --section, --key, and --edit. If value is not present it will be appended to the end of section.
inied --section mysqld --key key_buffer --delete  examples/my.cnf
To delete the key, one has to specify --section, key, and --delete.
inied --pretty-print  examples/my.cnf
To clean up output, one can use --pretty-print.
Contact me