• 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: Spaces in shell script paths
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Spaces in shell script paths


  • Subject: Re: Spaces in shell script paths
  • From: Bill Hoffman <email@hidden>
  • Date: Thu, 28 Mar 2002 16:54:59 -0800

On Thursday, March 28, 2002, at 02:51 PM, Adrian wrote:

There are several ways to solve your problem. You can hide the \ from applescript by changing it to \\.
do script "cd /Applications/HOBLink\\ JWT"
then the shell sees:
/Applications/HOBLink\ JWT
Alternatively, yet similarly, you can quote the path, like so:
do script "cd \"/Applications/HOBLink JWT\""
Also, you could create a shell script file and call that from Applescript

Or, if you have AppleScript 1.8.2b3, simply use the 'quoted form' property when passing a string to the shell via 'do shell script'. It handles all that for you. As in:

set theArg to "cd " & quoted form of "/Applications/HOBLink JWT"
set theResult to do shell script theArg

--
Bill Hoffman
email@hidden
_______________________________________________
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.

References: 
 >Re: Spaces in shell script paths (From: Adrian <email@hidden>)

  • Prev by Date: Re: AppleScript from shell?
  • Next by Date: Re: AppleScript from shell?
  • Previous by thread: Re: Spaces in shell script paths
  • Next by thread: AppleScript from shell?
  • Index(es):
    • Date
    • Thread