Bogdan Cristea said the following on 01/20/2011 02:51 AM:
On Thursday, January 20, 2011 08:44:16 am C. Brouerius van Nidek wrote:
With my relative meager memory (computer ;) ) I regularly run into problems when I receive a Skype call from abroad. In case of an incoming call I kill in a hurry all the running programs one by one. I wonder if I could make a button which would kill all regularly running programs in one sweep. Is there any negative effect if I would kill KMail, Firefox and Motv with a bash file? How would such a bash file look? I am not an expert in bash, only a happy user.
I do not see any incovenience in doing that. Your script should be like this:
ps -e | grep kmail #get the process ID kill -s SIGKILL pid
Some things like firefox have a script that starts them as well as the binary. For that reason I'd suggest using "pkill' instead. ARGS="kmail fireox motv" for i in $ARGS do pkill $i done You may need to specify the kill signal. See the manual page for pkill -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org