Re: Getting a PID and killing a process
Re: Getting a PID and killing a process
- Subject: Re: Getting a PID and killing a process
- From: JollyRoger <email@hidden>
- Date: Sat, 16 Mar 2002 18:42:16 -0600
On 3/16/2002 5:10 PM, "Hiram" <email@hidden> wrote:
>
On Friday, March 15, 2002, at 07:31 , John W Baxter wrote:
>
>
> do shell script: execute a shell script or command (defined in:
>
> StandardAdditions.osax)
>
>
I am looking for a way to use a shell script to get the PID of a
>
faceless process (wget) and then kill it, all from within a script.
>
>
It seems..
>
>
tell application "wget" to quit
>
>
..won't work, and neither does giving the full path to wget. Any help
>
is appreciated.
You might try one of these shell scripts:
ps uwax | grep wget| grep -v grep | awk {'system("kill $2")'}
kill `ps uwax | grep wget| grep -v grep | awk {'print $2'}`
HTH
JR
_______________________________________________
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.