Re: PATH variable for do shell script
Re: PATH variable for do shell script
- Subject: Re: PATH variable for do shell script
- From: Yvan KOENIG <email@hidden>
- Date: Tue, 03 Nov 2015 09:35:29 +0100
Le 2015/11/02 à 22:04, Alan Harper (lists) < email@hidden> a écrit :
Hi
When I upgraded to El Capitan some scripts stopped working because the PATH variable in AppleScripts doesn't include all the paths that I have set up for my login. For the moment, I'll just hard-wire in the path of the command in my script, but is there something I should know about this change? Is this a security issue? Are there are specific directories I should be using in order to access command line programs from AppleScript? do shell script "echo $PATH"
"/usr/bin:/bin:/usr/sbin:/sbin"
Thanks for any pointers
I was puzzled by the posix path mixing slashes and colon so I asked the system to grab the corresponding Hfs path with :
do shell script "echo $PATH" POSIX file result
tell application "System Events" exists result end tell
The result was : true but, when I try to navigate in the hierarchy, I am unable to go below : SSD 500:usr:bin:
What's the exact meaning of : "/usr/bin:/bin:/usr/sbin:/sbin" aka "SSD 500:usr:bin/:bin/:usr:sbin/:sbin" ?
Yvan KOENIG (VALLAURIS, France) mardi 3 novembre 2015 09:35:24
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden