in reply to Script to update a value in text file
For a small file, read the file into memory, make modifications as you will and then re-write the file. You may want to make some sort of backup scheme so that if your program dies while re-writing the file, the orginal data can still be recovered (i.e. don't delete, file and re-write with the same name because if that write fails, all data is lost).
|
|---|