On 06/07/2010 04:47 PM, Matthew Woehlke wrote:
> But this does not:
> $ echo "`echo \"you don\'t   say\"`"
> you don\'t   say

\' is not special inside ``.  If it is not special, then the \ is
preserved on to the nested command.  Bash's behavior matches POSIX here.

> 
> I expected:
> "you don't say"

Then don't use \'.  echo "`echo \"you don't  say\"`"

> 
> That is, I expected that \" -> " substitution would not happen inside
> the ``'s outside of the context of the command substitution, since the
> quotes do not need to be escaped in that context to be seen as quotes in
> the substitution context.

The quotes NEED to be escaped in the quoted command substitution
context, since behavior is undefined if " quotes are not escaped inside
"``".

-- 
Eric Blake   ebl...@redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to