M
Mark Probert
Hi.
I have a need to update a config file. It uses '#' as a line comment
marker. The config file looks like:
# file comment
#
name1:foo1:barther
name2:foo2:barther
name3:foo3:barther
name4:foo4:barther
The name:foo combination is unique.
What is the most efficient way to read in the file, update the line, and
then write it back to the file. One update would be to place a '#' in col
1
#name3:foo3:barther
Any thoughts appreciated.
-mark.
I have a need to update a config file. It uses '#' as a line comment
marker. The config file looks like:
# file comment
#
name1:foo1:barther
name2:foo2:barther
name3:foo3:barther
name4:foo4:barther
The name:foo combination is unique.
What is the most efficient way to read in the file, update the line, and
then write it back to the file. One update would be to place a '#' in col
1
#name3:foo3:barther
Any thoughts appreciated.
-mark.