I need to grep the output of a third party program. This program dumps out data but does not terminate without pressing ^c to terminate it.
I am currently searching
I think, you will need something more complex here. If you want to capture the output of the program you can't send the kill signal immediately to the program. Compared to your example above, the del command waits for input, while CTRL+C is no direct input but a kill signal.
I would suggest a solution where you identify if all output is captured and send the kill signal afterwards. Hoever, the point in time when all output can only be determined by you.