bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ${var:+"quo ted"} and similar, inside unquoted here-docs


From: Eric Blake
Subject: Re: ${var:+"quo ted"} and similar, inside unquoted here-docs
Date: Mon, 30 Aug 2010 09:14:59 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.8) Gecko/20100806 Fedora/3.1.2-1.fc13 Mnenhy/0.8.3 Thunderbird/3.1.2

On 08/30/2010 08:57 AM, Eric Blake wrote:
[adding bug-bash]
On 08/29/2010 08:48 AM, Ralf Wildenhues wrote:
With Solaris 10 sh (and others):

cat<<EOF
${var-"quo ted"}
EOF

"quo ted"

Whereas with bash (and others):

quo ted

Ouch. New one to me. ksh, zsh, and dash do not echo the quotes, so I'm
thinking it may be a bash bug; hence the cc.

Sorry about that; I read my results wrong. bash is consistent with everyone else, and only /bin/sh was the outlier. No bug in bash, after all.

--
Eric Blake   address@hidden    +1-801-349-2682
Libvirt virtualization library http://libvirt.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]