I have started running a long job by creating a script that executes several commands on 20 or so datasets sequentially. I began in the xterm window with
$ script.scr
then typed
<ctrl-Z>
then called
$ bg
and then exited the window. I have now returned and started another xterm window and decided to kill the job, but when I identify the PID with top and then
$ kill PID
the current process PID is killed but the job then starts the next command line of the script.
I could manually then kill again the new PID created but since there are 20 or more similar command lines in the script this becomes tedious. Is there a short (efficient) way of killing the whole job?
$ killall PID just kills the current process then a new one starts just the
same as using kill.
$ killall script.scr does not have any effect
kill %jobnumber