On 3/8/15 5:44 PM, Stephane Chazelas wrote:
> BTW, to get back on topic:
>
> $ bash --norc -o posix
> bash-4.3$ unset zzz
> bash-4.3$ zzz=x eval
> bash-4.3$ env | grep zzz
> zzz=x
>
> ksh93, zsh (in sh emulation), dash, mksh, the Bourne shell (the
> port of opensolaris' to Linux at least) do retain the value of
> zzz after eval has returned but don't export it to the
> environment. They don't export it within the evaled code either.
>
> $ ksh -c 'zzz=x eval "env | grep zzz"'
> $
>
> yash behaves like bash.
>
> If I interpret the POSIX spec correctly, the variable should
> *not* be exported in those cases (though it's not very clear):
It's unspecified.
austingroupbugs.net/view.php?id=654
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU [email protected] http://cnswww.cns.cwru.edu/~chet/