How to send control+c from a bash script?
Ctrl+C sends a SIGINT signal. kill -INT <pid> sends a SIGINT signal too: # Terminates the program (like Ctrl+C) kill -INT 888 # Force kill kill -9 888 Assuming 888 is your process ID. Note that kill 888 sends a SIGTERM signal, which is slightly different, but will also ask for the program to stop. … Read more