Re: How do I escape a question mark (?)
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.