Many Microsoft Windows programs use a textual data format that looks like Example5.6. This example associates optional resources named account, directory, numeric_id, and developer with named projects python, sng, fetchmail, and py-howto. The DEFAULT entry supplies values that will be used when a named entry fails to supply them.
Example5.6.A .INI file example.
[DEFAULT] account = esr [python] directory = /home/esr/cvs/python/ developer = 1 [sng] directory = /home/esr/WWW/sng/ numeric_id = 1012 developer = 1 [fetchmail] numeric_id = 18364 [py-howto] account = eric directory = /home/esr/cvs/py-howto/ developer = 1
This style of data-file format is not native to Unix, but some Linux programs (notably Samba, the suite of tools for accessing Windows file shares from Linux) support it under Windows's influence. This format is readable and not badly designed, but like XML it doesn't play well with grep(1) or conventional Unix scripting tools.
The .INI format is appropriate if your data naturally falls into its two-level organization of name-attribute pairs clustered under named records or sections. It's not good for data with a fully recursive treelike structure (XML is more appropriate for that), and it would be overkill for a simple list of name-value associations (use DSV format for that).