• 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: How do I escape a question mark (?)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How do I escape a question mark (?)


  • Subject: Re: How do I escape a question mark (?)
  • From: Christopher Nebel <email@hidden>
  • Date: Mon, 5 Aug 2002 17:06:17 -0700

On Monday, August 5, 2002, at 04:39 PM, Deivy Petrescu wrote:

If I can bother you a bit more, why:
do shell script "open eval echo /Web\\ Download/ "
works
and on terminal

"open eval echo /Web\\ Download/ "
does not, with all kinds of quotes I can think of (`,',")

Well, the obvious guess would be because of some difference between sh, which "do shell script" uses, and your default shell, which is tcsh unless you changed it.

However, neither works for me, and from what I know of shell parsing I don't see why it would. (I see a couple of extra spaces -- did a mailer strip something out?) Admittedly, I was barely aware of "eval" before you brought it up, but this is what I get:

do shell script "open eval echo /Web\\ Download/"
-- (error) open[1204] No such file /eval

do shell script "open `eval echo /Web\\ Download/`"
-- (error) open[1204] No such file /Web

do shell script "open \"`eval echo /Web\\ Download/`\""
-- success!

If you've never seen them before, backquotes (`foo`) execute the command inside and feed the result back as parameters.


--Chris Nebel
AppleScript Engineering
_______________________________________________
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: How do I escape a question mark (?) (From: Deivy Petrescu <email@hidden>)

  • Prev by Date: Re: With Timeout
  • Next by Date: Labels of a Record
  • Previous by thread: Re: How do I escape a question mark (?)
  • Next by thread: Applescript CGI Tutorial
  • Index(es):
    • Date
    • Thread