Re: Entourage: Kill that Daemon! (Shell)
Re: Entourage: Kill that Daemon! (Shell)
- Subject: Re: Entourage: Kill that Daemon! (Shell)
- From: Axel Luttgens <email@hidden>
- Date: Tue, 12 Nov 2002 13:04:08 +0100
email@hidden wrote:
[snip]
Here is what I have:
set msdbdPID to ("/bin/ps -auwx | grep -v /usr/bin/awk | /usr/bin/awk
'/Microsoft Database Daemon/ {print $2;}'")
do shell script ("kill -9 " & msdbdPID)
Not knowing a bit about Shell Scripting, what is wrong with this?
Your second line (the one starting with "do shell script..." first
concatenates "kill -9 " with the contents of msdbdPID, then passes the
resulting string to the shemll for execution.
But what you want, of course, is to perform "kill -9 pid", where pid is
the required process id.
You just need to add the forgotten part in your first line:
set msdbdPID to do shell script "/bin/ps -auwx | grep -v /usr/bin/awk | /usr/bin/awk
'/Microsoft Database Daemon/ {print $2;}'"
Now, as Paul wrote, there is a much easier way to do this in that case ;-)
Incidentally, what the hell is that M$ daemon?
I see it from times to times runnig in the background, and I would be
happy to know the reasons.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.