Killing a running script Programming Software Development by srinivas88 …. Killing a process (say test.out) is done by `pkill -9 test.out` and a script can be killed using… `sh test.sh` Then it cannot be killed using `pkill -9 test.sh` Since both options to run the script…3 done } stop () { echo "Stopping run.sh script" pkill -9 run.sh #** The above line works only if user… Re: Killing a running script Programming Software Development by L7Sqr The problem you are having with `pkill` is that, by default, it only checks the process name (`… use `pgrep` here (and you should, too, at first) since `pkill` matching with `-f` could catch other processes that happen to… Re: Killing a running script Programming Software Development by srinivas88 … `test.sh` shldn't come up and get killed with `pkill`. Now for just testing purpose is der any other option… with `pkill` which will not `kill gvim` which has `test.sh` opened… Re: Killing a running script Programming Software Development by L7Sqr If you spawn th eprogram *exactly* as `sh test.sh` then you can combine `-f` with `-x` to provide an exact match. For example: pkill -x -f 'sh test.sh' Or, instead of asking for an exact match, just provide more of the command line to lead to more unique results. Flash drive auto run project please help Programming Software Development by Thomasmcdaniel …().find(k) != -1): time.sleep(3) os.system("sudo pkill vlc") else: if mode == True and started == False and… and started == True and starting == False: os.system("sudo pkill vlc") wtl("******b\n") print x*200… 2 bash shell scripts with kill-trap Programming Computer Science by basak … esac shift done if [ "$calledprg" != "" ];then pkill -s 1 $calledprg fi exit #!/bin/bash #traptest PROGNAME=$(basename… Change Gnome 3 logout script? Hardware and Software Linux and Unix by stupendousomega … is find the script it runs and change it to pkill -KILL -u $USER That's what I've been typing… Re: How to kill all applications in linux? Hardware and Software Linux and Unix by pogson … class at a certain time... You can also use pkill -u someuser or pkill -f somecommand (watch out. That kills fred's… Re: DaniWeb Folding@Home Team Community Center Geeks' Lounge by jercos … can't even ssh in as root for a killall/pkill)) Re: php.ini confusion Programming Web Development by digital-ether …. windows: [CODE]start firefox -P --no-remote[/CODE] Linux: [CODE]pkill firefox firefox -P &[/CODE] Create a new profile just… Re: php.ini confusion Programming Web Development by midget …. windows: [CODE]start firefox -P --no-remote[/CODE] Linux: [CODE]pkill firefox firefox -P &[/CODE] Create a new profile just… Re: xterm -e Programming Software Development by Mocabilly Well, not realy a solution with CTRL-Z or a beauty contest winner; to run the command: xterm -T unique_name -e ping 192.168.1.1 & to quit the command: pkill -f "unique_name" Re: Killing a running script Programming Software Development by Watael you should read some init scripts. a trace of script's PID is kept in a file, so init scripts are killed using their PIDs. Re: Change Gnome 3 logout script? Hardware and Software Linux and Unix by rubberman Assuming your account is configured to use bash as the shell, then you need to edit ~/.bash_logout Re: Change Gnome 3 logout script? Hardware and Software Linux and Unix by stupendousomega Ah, thank you very much. This works.