• 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: Include "\" in do shell script command
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Include "\" in do shell script command (From: "Timothy K. Wilkinson" <email@hidden>)

  • Prev by Date: Re: Include "\" in do shell script command
  • Next by Date: Re: Finder window toolbar
  • Previous by thread: Re: Include "\" in do shell script command
  • Next by thread: Re: Include "\" in do shell script command
  • Index(es):
    • Date
    • Thread