Re: Re: A question on shell scripting in AppleScript (Applescript-users Digest, Vol 2, Issue 91)
Re: Re: A question on shell scripting in AppleScript (Applescript-users Digest, Vol 2, Issue 91)
- Subject: Re: Re: A question on shell scripting in AppleScript (Applescript-users Digest, Vol 2, Issue 91)
- From: Jonathan Levi MD <email@hidden>
- Date: Tue, 8 Feb 2005 22:12:42 -0500
At 12:02 PM -0800 2/8/05, email@hidden wrote:
Op 8-feb-05 om 16:21 heeft Francois Houle het volgende geschreven:
> ..I have a shell script
> where the path to the file contains a Space.. Int he terminal I simply
wou go like this: File\ Name
> However, when the command is in an AppleScript, as below then I get
> that there is an unknown identifier [in]
> eg:Ý do shell script "rm /Users/myaccount/Documents/My\ Folder"
Ý
> How can I go around this ?
Double the backslash, i.e.,
do shell script "open /System\\ Folder"--tested, it works
Or put the whole name in quotes:
do shell script "Open \"/System Folder\""--also tested
To see how a terminal sees your commands, use the
Terminal and "do script" instead:
tell application "Terminal"
activate
do script "open /System\\ Folder"--uncomment this or the next line
do script "Open \"/System Folder\""
end tell
(Incidentally, this is one answer to a question
someone asked a while back: Why use the Terminal
in AS? In general, I find it much easier to debug
with the Terminal; once I've got my shell script
debugged, I may convert to "do shell script".)
Jonathan
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden