On Thu, Dec 22, 2005 at 09:24:06AM -0500, Chet Ramey wrote:
> Bash-Release: 3.1
> Patch-ID: bash31-001
> 
> Bug-Description:
> 
> There are parsing problems with compound assignments in several contexts,
> including as arguments to builtins like `local', `eval', and `let', and
> as multiple assignments in a single command.

still seems to be a slight regression here with arrays ...

for example, consider this stripped down script:
expand_parameters() {
    local x=$( eval echo ${@// /_} )
    local -a a=( ${x} )
    a=( [EMAIL PROTECTED]/#/\"} )
    a=( [EMAIL PROTECTED]/%/\"} )
    echo "${a[*]//_/ }"
}
iface_start() {
    local -a a
    a=( "${config_lo}" )
    expand_parameters "${a[0]}"
}
config_lo=( "127.0.0.1/8 brd 127.255.255.255" )
iface_start

if we run this with <=bash-3.0, we get:
"127.0.0.1/8 brd 127.255.255.255"
with bash-3.1 though, we get no output at all ...

changing expand_parameters() slightly is one workaround:
-    local -a a=( ${x} )
+    local -a a ; a=( ${x} )
-mike


_______________________________________________
Bug-bash mailing list
Bug-bash@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-bash

Reply via email to