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 and killing it using its pid. However, I was wondering however if it were possible to echo the control C character. Pseudo code would look like
echo ^c | ./program_that_does_not_terminate
I am able to do something like this in DOS, so there must be a way in linux.
C:\>echo y | del C:\tmp\*
C:\tmp\*, Are you sure (Y/N)? y
C:\>
kill -s SIGINT
if you want to send it Ctrl-C. – Somerset