I am a total noob in shell scripting. I am creating a .sh
file with multiple commands, but my problem is that the last command is an executable file that after executing stays open and the processes keep running in the terminal until I close the terminal or press Ctrl+C or \. I want to kill these processes or quit the terminal which will also kill the process automatically while running the .sh
file. This is the script so far:
#!/usr/bin/env bash
cd ./var/www/testGraduationProject1/public/Hume2Compiler/bin/
export PATH=$PATH:`pwd`
humec -lotsaspace tails.hume;
./tails > hello.txt
I have tried these two commands but they just stop the loading of process in terminal, but without closing the terminal or the process itself.
killall tails
stty -a | grep inter
kill -3 <pid>
. Not sure if that will do what you want though.