[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Fwd: for VAR; do does not work any more on some platforms
From: |
Eric Blake |
Subject: |
Fwd: for VAR; do does not work any more on some platforms |
Date: |
Sat, 04 Mar 2006 17:46:35 -0700 |
User-agent: |
Thunderbird 1.5 (Windows/20051201) |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Bash 3.1 currently violates POSIX in that 'for V ; ...' does not behave
like 'for V in "$@" ; ...'. As evidenced from this snippet of a report on
bug-bash, it affects autoconf. Should we document this in shell
limitations, and work around it, or just assume that a patch to bash 3.1
will be available soon?
==========
- -------- Original Message --------
Subject: for VAR; do does not work any more on some platforms
Date: Sat, 04 Mar 2006 11:20:23 +0000
From: bashbugreport-ta AT durchnull.de
To: bug-bash AT gnu.org
Bash Version: 3.1
Patch Level: 11
Release Status: release
Description:
In other shells (like bash 3.0, bash 2.x, zsh, dash),
for VARIABLE; do ...; done
is equivalent to
for VARIABLE in "$@"; do ...; done
GNU autoconf also relies on this fact at many points:
ac_prev=
for ac_option
do
# If the previous option needs an argument, assign it.
if test -n "$ac_prev"; then
eval "$ac_prev=\$ac_option"
ac_prev=
continue
fi
ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
- --
Life is short - so eat dessert first!
Eric Blake address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFECjTr84KuGfSFAYARAmBPAJ9A7Vq0RJvf6xq+pTuLfm0d5rLwSQCfTcTj
uS6JJfDNkmsWG4Sl9yCqe0U=
=2ZnE
-----END PGP SIGNATURE-----
- Fwd: for VAR; do does not work any more on some platforms,
Eric Blake <=