Project Description:
Input text file contains lines like:
[01:32:37:265]
always one line of text, often 2 or more lines, including maybe the string <i>
[01:32:38:123]
a block begins with timecode brackets and ends with it. (the timecode 01:32... is just an example, the number will always be different.)
if the block containes <i> (on one or more instances), the whole block (including [..]) needs to be written (>>) in output-file2,
if not, it goes to to output-file1.
Additionally, remove all instances of <i> and </i> from output-file2 on demand.
Script must work on osx shell and linux. Maybe you operate with sed.
P.S. shell script will work on Linux and MacOS