Update a configuration file: Difference between revisions

Content deleted Content added
Line 617: Line 617:
print cfg
print cfg
</lang>
</lang>

Output:
<pre>
# This is a configuration file in standard configuration file format
#
# Lines begininning with a hash or a semicolon are ignored by the application
# program. Blank lines are also ignored by the application program.

# The first word on each non comment line is the configuration option.
# Remaining words or numbers on the line are configuration parameter
# data fields.

# Note that configuration option names are not case sensitive. However,
# configuration parameter data is case sensitive and the lettercase must
# be preserved.

# This is a favourite fruit
FAVOURITEFRUIT banana

# This is a boolean that should be set
; NEEDSPEELING

# This boolean is commented out
SEEDSREMOVED

# How many bananas we have
NUMBEROFBANANAS 1024

NUMBEROFSTRAWBERRIES 62000
</pre>


=={{header|Ruby}}==
=={{header|Ruby}}==