I'm running a program which executes (mostly) correctly, but then hangs. I'd like to run the program such that once it outputs a certain string, or stops producing output it gets killed.
The output string I'm interested in is:
Was exported to:
After I see this output, I'd like to automatically kill the program. Alternatively, the program stops producing output after this, so I could kill it based on that condition. How can I accomplish one of these?