• 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: Ping with AS under OS X?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Ping with AS under OS X?


  • Subject: Re: Ping with AS under OS X?
  • From: Christopher Nebel <email@hidden>
  • Date: Mon, 20 May 2002 17:54:46 +0100

On Monday, May 20, 2002, at 05:36 PM, T.J. Mahaffey wrote:

The following isn't working:

tell application "Terminal"
do shell script "ping 172.19.230.200" with administrator privileges
end tell

"do shell script" is completely independent of Terminal. You can tell Terminal to "do script", if you like -- it will create a new window and run the command it. Also, I don't think ping requires administrator privileges, though it won't hurt anything.

The problem you're having is because "do shell script" (or more precisely, the sh process it spawns) uses a very restricted PATH to locate commands. Say "/sbin/ping" instead, and it'll work.


--Chris Nebel
AppleScript Engineering
_______________________________________________
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: Ping with AS under OS X?
      • From: John W Baxter <email@hidden>
  • Prev by Date: Re: [OFF} Simple Digital Audio Recording
  • Next by Date: Re: Linked lists (was osascript - path to me)
  • Previous by thread: Ping with AS under OS X?
  • Next by thread: Re: Ping with AS under OS X?
  • Index(es):
    • Date
    • Thread