riccardo wrote:
On Wednesday 23 February 2005 07:11 pm, Mikkel L. Ellertson wrote:

difference between doing this script, and using the killall command?

___________________

 ~ have been doing some [EMAIL PROTECTED]

 . . . before doing a backup this morning, i gave root command :

< killall Fah >      . . . but that did not kill [EMAIL PROTECTED] processes,

 whereas, <  kl Fah  > did  kill [EMAIL PROTECTED] processes

.....................

 "kl" being :-
_________
#!/bin/sh
#
# kill process/program
#
while true
do
kill -9 `ps aux | grep -i $1 | awk '{ print $2 }'` sleep 2
done

..............................

best rgds
______



I can see the difference, and I am not sure if I like it. It is too easy to kill processes you don't want to kill. Nasty if you want to kill all the "foo" processes, but not the "foobar" processes. kl would kill both because grep would match both "foo" and "foobar" if you specified "foo".

Mikkel
--

  Do not meddle in the affairs of dragons,
for you are crunchy and taste good with Ketchup!

____________________________________________________
Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com
Join the Club : http://www.mandrakeclub.com
____________________________________________________

Reply via email to