• 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: Getting a PID and killing a process
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Getting a PID and killing a process
      • From: Hiram <email@hidden>
References: 
 >Getting a PID and killing a process (Was: Re: Scripting a command to unix..) (From: Hiram <email@hidden>)

  • Prev by Date: Re: Open files
  • Next by Date: Re: "play sound"
  • Previous by thread: Getting a PID and killing a process (Was: Re: Scripting a command to unix..)
  • Next by thread: Re: Getting a PID and killing a process
  • Index(es):
    • Date
    • Thread