Re: Include "\" in do shell script command
Re: Include "\" in do shell script command
- Subject: Re: Include "\" in do shell script command
- From: Rob Jorgensen <email@hidden>
- Date: Fri, 18 Jul 2003 14:42:27 -0400
At 2:19 PM -0400 7/18/03, Timothy K. Wilkinson wrote:
> From: John Delacour <email@hidden>
Reply-To: email@hidden
Date: Fri, 18 Jul 2003 18:57:51 +0100
To: email@hidden
Subject: Re: Include "\" in do shell script command
At 1:04 pm -0400 18/7/03, Timothy K. Wilkinson wrote:
Anyone have any ideas on how I can put this character in my command string?
Here's the offending line (beware of line wrapping)
do shell script "whois -h whois.virginia.edu " & (ASCII character 92) & "!"
& the_id
> do shell script "whois -h whois.virginia.edu \\!tkw4u"
Appreciate you posting that on the list. I'll make sure to forward all the
spam I get to you. :-)
The problem is that using that syntax works just fine if you actually put
the id in there. It compiles and runs just fine as you so nicely
demonstrated. Now try it the way I actually posted it:
do shell script "whois -h whois.virginia.edu " & (ASCII character 92) & "!"
& the_id
Or like this:
Do shell script "whois -h whois.virginia.edu \\!" & the_id
Both return the same error telling me the record can't be found, yet I know
the record exists. If I look in the event log it shows the command being
issued in exactly the same way as when I actually enter an ID into the
string. It seems as if the variable is the weak link here. I tried running
the above and declaring the contents of the variable earlier in the script
and got the same error.
This works fine for me in OS X 10.2.6.
set the_id to "tkw4u"
do shell script "whois -h whois.virginia.edu \\!" & the_id
--
Rob Jorgensen
Ohio, USA
_______________________________________________
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.