• 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: Re: A question on shell scripting in AppleScript (Applescript-users Digest, Vol 2, Issue 91)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: A question on shell scripting in AppleScript (Applescript-users Digest, Vol 2, Issue 91)
      • From: Barry Wainwright <email@hidden>
  • Prev by Date: help with folder copy
  • Next by Date: Reading a csv file
  • Previous by thread: Re: help with folder copy
  • Next by thread: Re: A question on shell scripting in AppleScript (Applescript-users Digest, Vol 2, Issue 91)
  • Index(es):
    • Date
    • Thread