I have a 10 GB text file, from which I want to find and delete a multi-line chunk. This chunk is given as another 10 MB text file, constituting a contentious section appearing once in the large file and spanning complete lines. Assuming I do not have enough memory to process the whole 10 GB in memory, what would be the easiest way to do so in some scripting language?
Example:
big.txt:
...
I have a 10 GB text file, from which I want to find and delete a multi-line chunk.
This chunk is given as another 10 MB text file,
constituting a contentious section appearing once in the large file and spanning complete lines.
Assuming I do not have enough memory to process the whole 10 GB in memory,
what would be the easiest way to do so in some scripting language?
...
chunk.txt:
This chunk is given as another 10 MB text file,
constituting a contentious section appearing once in the large file and spanning complete lines.
result.txt:
...
I have a 10 GB text file, from which I want to find and delete a multi-line chunk.
Assuming I do not have enough memory to process the whole 10 GB in memory,
what would be the easiest way to do so in some scripting language?
...