Configuration Information:
Machine: i686
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i686'
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i686-pc-linux-gnu'
-DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -DSHELL
-DHAVE_CONFIG_H -I. -I. -I./include -I./lib -O2 -march=i686 -pipe
uname output: Linux Celsius 2.6.21.3 #1 SMP PREEMPT Fri May 25 10:14:50
CEST 2007 i686 GNU/Linux
Machine Type: i686-pc-linux-gnu
Bash Version: 3.2
Patch Level: 17
Release Status: release
Description:
If a is an array, ${a[*]//%pattern/replacement} and
${a[*]//#pattern/replacement} don't work. Both do nothing. The single-slash
versions ${a[*]/%pattern/replacement} and ${a[*]/#pattern/replacement} work
as expected.
One could argue about using // in this context, but anyway the behavior is
inconsistent in 2 ways:
- The double-slash versions worked in 3.1.
- The double-slash versions work in 3.2 if the pattern does _not_ start
with % or #.
Repeat-By:
x=(a1 a2 a3)
echo ${x[*]//%/y} # output: a1 a2 a3
echo ${x[*]//%2/y} # output: a1 a2 a3
echo ${x[*]//#/y} # output: a1 a2 a3
echo ${x[*]//#a/y} # output: a1 a2 a3
echo ${x[*]//a/y} # output: y1 y2 y3
--
Bernd Eggink
[EMAIL PROTECTED]
http://monoped.de
_______________________________________________
Bug-bash mailing list
Bug-bash@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-bash