I am a total noob in shell scripting. I am creating .sh file to make some multiple commands, but my problem is that the last command is an executable file that after excuting it stays open and the processes keep running in the terminal until i close the terminal or press Ctrl+ C or \. i want to kill this processes or quit the terminal which will also kill the process automatically while running the .sh file. this is the .sh file below. excuse my question if it was simple.
#!/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 this 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. – jpd May 29 '12 at 19:44