I want to run two commands simultaneously in bash on a Linux machine. Therefore in my
./execute.sh bash script I put:
command 1 & command 2 echo "done"
However when I want to stop the bash script and hit Ctrl+C, only the second command is stopped. The first command keeps running. How do I make sure that the complete bash script is stopped? Or in any case, how do I stop both commands? Because in this case no matter how often I press Ctrl+C the command keeps running and I am forced to close the terminal.