> Date: Thu, 9 Aug 2012 11:30:13 +0200 > From: Landry Breuil <lan...@rhaalovely.net> > List-Owner: <mailto:owner-t...@openbsd.org> > X-Loop: tech@openbsd.org > Sender: owner-t...@openbsd.org > X-XS4ALL-DNSBL-Checked: mxdrop222.xs4all.nl checked 192.43.244.163 against > DNS blacklists > X-CNFS-Analysis: v=2.0 cv=JstGWrEC c=1 sm=0 a=A3duGc4wJ8K8BtNzzvyz4A==:17 > a=wom5GMh1gUkA:10 a=Tyz8kzrSaUAA:10 a=A-czM1wNRfMA:10 > a=kj9zAlcOel0A:10 a=HuvqD92KAAAA:8 a=pQs5aej7AAAA:8 > a=d6fq7G5S5sWEmd_PXfoA:9 a=CjuIK1q_8ugA:10 > a=A3duGc4wJ8K8BtNzzvyz4A==:117 > X-Virus-Scanned: by XS4ALL Virus Scanner > X-XS4ALL-Spam-Score: 0.0 () none > X-XS4ALL-Spam: NO > Envelope-To: mark.kette...@xs4all.nl > > Hi, > > in the context of https://bugzilla.mozilla.org/show_bug.cgi?id=781461 > i've stumbled upon the following issue: > (our pdksh) > $FOO=1 > $cat <<EOF > > echo ${FOO:+'blah'aa} > > EOF > echo blahaa > > bash-4.2# FOO=1 > bash-4.2# cat <<EOF > > echo ${FOO:+'blah'aa} > > EOF > echo 'blah'aa > > Apparently the ksh from solaris, hpux and debian don't strip the quotes > in that usecase, and none of the other shells do (bash, dash, zsh...) > > So maybe it can be considered as a bug in our pdksh..
I think it is. POSIX says in 2.6.2 Parameter Expansion that: "...word shall be subjected to tilde expansion, parameter expansion, command substitution, and arithmetic expansion." which suggests that quote removal isn't supposed to happen.