• 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: Do shell script and spaces in path
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Do shell script and spaces in path


  • Subject: Re: Do shell script and spaces in path
  • From: Simon Forster <email@hidden>
  • Date: Fri, 19 Apr 2002 11:16:58 +0100

On Friday, April 19, 2002, at 10:40 AM, Ralf Bitter wrote:

How do you write a space in a path of a " do shell script" statement?

For example: do shell script "ls -l /Applications/BBEdit\ Lite"

This gives an error. Seems, that a backslash is not allowed in a path,
although this is the way the path is written in a shell.

Two ways. Either escape the backslash:

do shell script "ls -l /Applications/BBEdit\\ Lite"

or escape the surrounding quotes:

do shell script "ls -l \"/Applications/BBEdit Lite\""

HTH

Simon Forster
________________________________________________
LDML Ltd, 4/5 Hazlitt Mews, London, W14 0JZ, UK
<tel int="+44 20 7602 9370" uk="020 7602 9370">
<fax int="+44 20 7371 6662" uk="020 7371 6662">
<mailto: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: 
 >Do shell script and spaces in path (From: Ralf Bitter <email@hidden>)

  • Prev by Date: FileMaker Pro question
  • Next by Date: Re: illus-trator
  • Previous by thread: Re: Do shell script and spaces in path
  • Next by thread: AppleScript Studio and NSBrowser/NSPopUpButton
  • Index(es):
    • Date
    • Thread