Package: bash
Version: 3.2-4
Severity: normal

$ a=one b=two
$ a=three b=$a sh -c 'echo $a $b'
three three
$ echo $a $b
one two
$ a=three b=$a sh -c 'echo $a $b'
three three
$ a=three b=$a sh -c 'echo $a $b'
three one
$ echo $a $b
one two
$ echo $BASH_VERSION
3.2.39(1)-release
$ 

Surely the output of "a=three b=$a sh -c 'echo $a $b'" should be
the same every time, because the assignments do not appear to
have a lasting effect in the outer shell.  

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 
'experimental')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.24-1-686
Locale: LANG=fi_FI.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)

Versions of packages bash depends on:
ii  base-files                4.0.1          Debian base system miscellaneous f
ii  debianutils               2.17.3         Miscellaneous utilities specific t
ii  libc6                     2.5-1          GNU C Library: Shared libraries
ii  libncurses5               5.6+20070908-1 Shared libraries for terminal hand

Note, I compiled all of those packages from Debian sources on this machine.

Versions of packages bash recommends:
pn  bash-completion               <none>     (no description available)

-- no debconf information

Attachment: pgpr2GYWcrqKq.pgp
Description: PGP signature

Reply via email to