• 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: Passing ampersands through a shell script
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Passing ampersands through a shell script


  • Subject: Re: Passing ampersands through a shell script
  • From: Doug McNutt <email@hidden>
  • Date: Sun, 25 Oct 2009 13:49:46 -0600

At 10:54 -0700 10/25/09, Bruce Brown wrote:
>Looks like you've solved your immediate problem, so I'll offer the  following for thought, further discussion, and future reference ...
>
>You could also QUOTE the ampersand before passing it to the Unix  shell. Quoting a single character in Unix (i.e., in the Shell) is  done by preceding that character with a backslash (\) character. So,  to quote an ampersand, you'd replace the single character
>
>&
>
>with the two-character string
>
>\&
>
>in an Unix command or in an Unix script.
SNIP by DPM

The problem with escapes like that is that AppleScript, as well as the shell, wants to interpret the \ escape character so you have to escape the escape.

\\&

But in some cases one needs to pass the escape resulting in \\\&.  AppleScript's "quoted form of" is supposed to fix it all up.
--
--> So are we going to celebrate the start of a new decade at the end of this year? Or do the tens start at in January 2011? <--
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Passing ampersands through a shell script
      • From: Luther Fuller <email@hidden>
References: 
 >Passing ampersands through a shell script (From: hd <email@hidden>)
 >Re: Passing ampersands through a shell script (From: LuKreme <email@hidden>)
 >Re: Passing ampersands through a shell script (From: hd <email@hidden>)
 >Re: Passing ampersands through a shell script (From: LuKreme <email@hidden>)
 >Re: Passing ampersands through a shell script (From: Bruce Brown <email@hidden>)

  • Prev by Date: Re: Wrong day name in Date format
  • Next by Date: Re: Wrong day name in Date format
  • Previous by thread: Re: Passing ampersands through a shell script
  • Next by thread: Re: Passing ampersands through a shell script
  • Index(es):
    • Date
    • Thread