in reply to Changing records in a text file
You want to do atomic updates on a large pool of data -- this sounds like a problem for a database. Something like SQLite, or even a disk-based hash like BerkeleyDB, will be far superior to manually munging individual fields in a giant CSV.
If you use an SQL-based solution like MySQL or SQLite, then it's as simple as executing "UPDATE codes SET used = 1 WHERE id = 'foobar'" and you let the DB do the hard work for you.
|
|---|