• 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: garbanzito <email@hidden>
  • Date: Fri, 19 Apr 2002 09:12:17 -0600

at 2002 04 19, 11:30 +0100, they whom i call Giuliano Gavazzi wrote:
Thus:

do shell script "ls -l /Desktop\\ Folder"

works.

Now, a single backslash should be allowed, and it should be ignored when not followed by special characters, that is:
"\ " should be equivalent to " ", this seems like a bug, but this is not what you would need in your case anyway.

it's not a bug, it's a common conceptual fallacy. there is
no need to escape the *space* in AppleScript, because
AppleScript has no problem with spaces in strings. you need
to escape the *backslash* so that it reaches the shell,
where it is needed to escape the space.

in AppleScript ...

"\ " = an escaped space, compiles to " " before it reaches
the shell.

"\\ " = an escaped backslash followed by a space. "\ "
reaches the shell.

--
steve harley 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.

  • Follow-Ups:
    • Re: Do shell script and spaces in path
      • From: Giuliano Gavazzi <email@hidden>
References: 
 >Do shell script and spaces in path (From: Ralf Bitter <email@hidden>)
 >Re: Do shell script and spaces in path (From: Giuliano Gavazzi <email@hidden>)

  • Prev by Date: Re: Google and SOAP vs. AppleScript
  • Next by Date: Re: Script for Chinese in Appleworks
  • Previous by thread: Re: Do shell script and spaces in path
  • Next by thread: Re: Do shell script and spaces in path
  • Index(es):
    • Date
    • Thread