I have an inputfile that looks like this:
<event>
foo
bar
</event>
<event>
random text
</event>
I would like to split this up into several output files, such that each file has exactly one <event>...</event>.
I tried doing this with awk, but it is not clear to me how I can redirect the output to different output files. Is it possible? Or do I have to resort to something like e.g. python?