>> --do shell script "/bin/ps -xa"
>> do shell script "pid=` /bin/ps -x | /usr/bin/grep \"Classic
>> Startup.ap[p]\" | /usr/bin/awk '{print $1}'` ; kill $pid"
>
> no sense messing with all that.
>
> do shell script "kill `/bin/ps x| /usr/bin/grep \"Classic Startup\" |
> grep -v grep | /usr/bin/awk '{print $1}'`"
>
> (first, the - is deprecated for ps, second, you need to exclude the
> grep because it MIGHT have a lower PID that the Classic Startup, third
> no reason to mess with storing off to variables when you can do it all
> in a single command.)
No sense messing around with all THAT, either.
man killall
DESCRIPTION
Killall kills processes selected by name, as opposed to the selection
by pid as done by kill(1). By default, it will send a TERM signal to
all processes with a real UID identical to the caller of killall that
match the name procname. The super-user is allowed to kill any
process.
Just a thought, from somebody who ifrst discovered killall on the Apple OS X
Server list when Mike Bartosh deconstructed my own elaborate construct that
got replaced by killall lookupd. :^)
--
Dave Pooser
Cat-Herder-in-Chief
Pooserville.com
"Just when I finally craft a perfect lesbian fantasy about those two,
they have to go and ruin it by being people."-- Something Positive
#############################################################
This message is sent to you because you are subscribed to
the mailing list <[EMAIL PROTECTED]>.
To unsubscribe, E-mail to: <[EMAIL PROTECTED]>
To switch to the DIGEST mode, E-mail to <[EMAIL PROTECTED]>
To switch to the INDEX mode, E-mail to <[EMAIL PROTECTED]>
Send administrative queries to <[EMAIL PROTECTED]>