On Tue, Mar 25, 2014 at 2:39 AM, Pollock, Wayne <wpoll...@hccfl.edu> wrote:
> $ echo $BASH_VERSION > 4.2.45(1)-release > > $ unset foo > > $ foo=bar : > > $ echo $foo > > > $ > > =============== > > According to POSIX/SUS issue 7, assignments for special builtins > should persist. So the output should be ``bar''. > > Is there a setting I should turn off (or need to enable), to > make this work correctly? > > I was able to confirm this bug for version 4.2.37(1)-release as > well. (zsh 4.3.17 (i386-redhat-linux-gnu) has the same bug.) > > -- > Wayne Pollock It works when bash runs in posix mode, eg: $ POSIXLY_CORRECT=1 bash -c 'foo=bar : ;echo $foo' bar $ bash --posix -c 'foo=bar : ;echo $foo' bar