Joerg Schilling <joerg.schill...@fokus.fraunhofer.de> wrote, on 25 Jul 2017: > > unset X > cat <<-EOF > ${X=2} > EOF > echo "${X-1}" > > it turned out that ksh88 and a classical Bourne Shell both print > > 2 > 1 > > but ksh93 and my "bosh" print > > 2 > 2 > > but when I recompile bosh with -DNO_VFORK, it prints > > 2 > 1 > > Could you comment whether this is undefined as well?
Yes it is, as far as I can see. The relevant text in 2.7.4 is: If no part of word is quoted, all lines of the here-document shall be expanded for parameter expansion, command substitution, and arithmetic expansion. It says nothing about which environment the expansion must be done in. -- Geoff Clare <g.cl...@opengroup.org> The Open Group, Apex Plaza, Forbury Road, Reading, RG1 1AX, England