J
Jason Kinkade
I have a text file that looks like.
---unique id---
many lines
---------------
---unique id---
many lines
---------------
---unique id---
many lines
---------------
....etc.
I want to simply remove a section between the ---unique id--- and
---------. Now I know I could go through it line by line and output
the filtered text to a tmp file then copy the tmp file back, but thats
impracticle with the file is like a gig in size. Does anyone know a
way I can operate on the text file directly and remove a section
without copying the whole file to a tmp file or temporatily into
memory?
Thanks
---unique id---
many lines
---------------
---unique id---
many lines
---------------
---unique id---
many lines
---------------
....etc.
I want to simply remove a section between the ---unique id--- and
---------. Now I know I could go through it line by line and output
the filtered text to a tmp file then copy the tmp file back, but thats
impracticle with the file is like a gig in size. Does anyone know a
way I can operate on the text file directly and remove a section
without copying the whole file to a tmp file or temporatily into
memory?
Thanks