Hi,
I have a file consisting of a number of lines of text, I want to read the file in order and execute some code based on the content of each line.
My problem is that I only want to access each line once and because of the size of the file, my script times out, so only gets so far down the file. If I then run the script again it starts from the beginning of the file rather than from where it left off.
My idea is to delete each line of the file after it has been used, however I can't find out how to do this or if this is the best way...
Unfortunately I don't have administrative access to the server so I can't simply extend the script timeout (and wouldn't want to anyway)
Any ideas anybody?
Thanks
Hope this helps,
Phil Clare
I have a file consisting of a number of lines of text, I want to read the file in order and execute some code based on the content of each line.
My problem is that I only want to access each line once and because of the size of the file, my script times out, so only gets so far down the file. If I then run the script again it starts from the beginning of the file rather than from where it left off.
My idea is to delete each line of the file after it has been used, however I can't find out how to do this or if this is the best way...
Unfortunately I don't have administrative access to the server so I can't simply extend the script timeout (and wouldn't want to anyway)
Any ideas anybody?
Thanks
Hope this helps,
Phil Clare