Echo Control C character

后端 未结 5 1146
醉酒成梦
醉酒成梦 2020-12-17 10:22

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

5条回答
  •  长情又很酷
    2020-12-17 10:31

    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.

提交回复
热议问题