Re: Passing ampersands through a shell script
Re: Passing ampersands through a shell script
- Subject: Re: Passing ampersands through a shell script
- From: "Mark J. Reed" <email@hidden>
- Date: Sun, 25 Oct 2009 14:32:00 -0400
An ampersand terminates the comand and starts a new one which runs in
parallel. Run three copies of ls all fighting over the same terminal
to show their output:
ls & ls & ls
But in this case the problem is that ampersand is also special in URL
query strings. If you send
http://post/my/info?artist=Captain&Tennille
then the variable assignments are "artist=Captain" and "Tennille=",
rather than the intended "artist=Captain&Tennille". Backslash or
quotation marks will get the ampersand through the shell, but don't
help with the query string problem. You need both a quoting mechanism
for the shell, and to tell whatever command you're using to escape the
query string values, so it sends
http://post/my/info?artist=Captain&Tennille
instead.
--
Mark J. Reed <email@hidden>
_______________________________________________
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