Manipulatuing a text file: Important (but not enough points)
Posted on 2003-03-16
Ok, here is my problem
I have a text file that contains some 10000 lines like this:
x1x1x1x1x1x1 "y1y1y1y1y1y1y1y1" "w1" "z1z1z1z1z1z1z1z1z1z1"
x2x2x2x2x2x2 "y2y2y2y2y2y2y2y2" "w2" "z2z2z2z2z2z2z2z2z2z2"
Now my problem is, when I want to edit for instance a line were the "yxyxyxyxyxyx" = "stofferken" I need to load the whole file and I need to check every line for it. Then I have to write back the whole file with just 1 line changed. This goes extremely slow so Id like to know if there are different ways to do this, just to "edit" a line and not to re-write the whole file or something.