Re: Include "\" in do shell script command
Re: Include "\" in do shell script command
- Subject: Re: Include "\" in do shell script command
- From: "Steven D. Majewski" <email@hidden>
- Date: Fri, 18 Jul 2003 13:58:29 -0400
On Friday, July 18, 2003, at 01:04 PM, Timothy K. Wilkinson wrote:
I'm trying to write a script command that will do a search of the our
whois
database. I need to include the "\" character in the command being
sent.
However AS won't let me include that in the string of text. I've tried
isolating it out and putting it into it's on quoted string but that
doesn't
work either. I've also tried putting the ASCII character in the
command
string but it puts 2 in instead of one.
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
The backslash is an escape char for applescript as well as the shell --
you
just need to double it to escape the escape:
do shell script "whois -h whois.virginia.edu \\!sdm7g"
-- Steve Majewski
UVA Alderman Library DLPS
_______________________________________________
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.