Re: Scripting Additions: Embracing the Horror of Unix
Re: Scripting Additions: Embracing the Horror of Unix
- Subject: Re: Scripting Additions: Embracing the Horror of Unix
- From: Christopher Nebel <email@hidden>
- Date: Thu, 31 Jan 2002 16:08:40 -0800
On Thursday, January 31, 2002, at 03:45 PM, Shane Stanley wrote:
On 1/2/02 9:55 AM +1000, Oliver Sun, email@hidden, wrote:
Am I understanding you correctly that you are trying to pass a string
from AppleScript to a shell script, which may possibly have spaces or
other special characters?
Example: "My HD:Users:Me:Documents:My Funny Stuff:WTF$CK" in the
traditional Mac form needs to become the POSIX path
/Users/Me/Documents/My Funny Stuff/WTF$CK, except you must deal with
the
spaces and the $ ?
If so, you will want to use single quotes, which are even stronger than
the double quote.
So is this what the new "quoted form" property of a string provides
automatically? So we can get the POSX path, then get the quoted form of
that, and use the result safely without further ado?
Yes, except that it doesn't actually work in AppleScript 1.8.1. It
should be fixed in 1.8.2, though I'm not sure if it's fixed in the b1
that's currently out.
--Chris Nebel
AppleScript Engineering