I have a large XML file and I want to extract blocks from it.
For example, there is a large block:
<tag>
....
</tag>
I want to check if there is a specific string within the block - if yes, then extract the entire block from <tag> to </tag>.
I tried using nawk but I didnt know how to make the "if" part. It's a Sun machine, thus Sun OS.