• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Entourage: Kill that Daemon! (Shell)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Entourage: Kill that Daemon! (Shell)


  • Subject: Re: Entourage: Kill that Daemon! (Shell)
  • From: Axel Luttgens <email@hidden>
  • Date: Thu, 14 Nov 2002 13:03:05 +0100

Gnarlodious wrote:

>Entity Axel Luttgens spoke thus:
>
>
>
>>Now, as Paul wrote, there is a much easier way to do this:
>>tell application "Finder" to quit application "Microsoft Database Daemon"
>>
>>
>
>[snip]
>
>So, back to the Shell, which (I hope) will run as a compiled script:
>do shell script ,
> ("kill -9 " & "/bin/ps -auwx | grep -v /usr/bin/awk | /usr/bin/awk
>'/Microsoft Database Daemon/ {print $2;}'")
>
>This seems to run but according to Process Viewer it doesn't quit the
>Daemon.
>Is that line OK? I don't understand this shell scripting!
>
>
>
I think you just overlooked one or two words in my previous post
(perhaps should I consider my english to be extremely unintelligible -
tell me sincerely :-) ).
What I meant was this:

-- First get the daemon's PID; that is, ask the shell to get that number
(which
-- will be returned to AppleScript as a string):
set msdbdPID to do shell script "/bin/ps -auwx | grep -v /usr/bin/awk |
/usr/bin/awk '/Microsoft Database Daemon/ {print $2;}'"
-- Then use that value to kill the daemon; that is, create the string
"kill -9 pid"
-- and pass that string as a command to the shell:
do shell script ("kill -9 " & msdbdPID)

So, your original script just missed a tiny part in its first line...

Now, interestingly, you said that your line of code above seemed to run.
I guess it just returned an error string about illegal arguments for
kill (and luckily didn't kill an arbitrary process).

HTH
_______________________________________________
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.

References: 
 >Re: Entourage: Kill that Daemon! (Shell) (From: Gnarlodious <email@hidden>)

  • Prev by Date: Re: Scripting Eudora
  • Next by Date: Re: Tid's 'n AS
  • Previous by thread: Re: Entourage: Kill that Daemon! (Shell)
  • Next by thread: Re: Entourage: Kill that Daemon! (Shell)
  • Index(es):
    • Date
    • Thread