On Saturday 24 December 2005 13:27, Chet Ramey wrote: > Mike Frysinger wrote: > > 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 ... > > Try this:
maybe ... it fixed the setting of the array yes, but now i'm not sure if the behavior i'm seeing is a regression or a bugfix ... here is a slightly expanded test case from before: expand_parameters() { local x=$( eval echo ${@// /_} ) local -a a=( ${x} ) a=( [EMAIL PROTECTED]/#/\"} ) a=( [EMAIL PROTECTED]/%/\"} ) echo "${a[*]//_/ }" } iface_start() { local i local -a config a a=( "${config_lo}" ) for (( i=0; i<[EMAIL PROTECTED]; i++)); do local -a b=( $( expand_parameters "${a[i]}" ) ) config=( "[EMAIL PROTECTED]" "[EMAIL PROTECTED]" ) done echo [EMAIL PROTECTED] } config_lo=( "127.0.0.1/8 brd 127.255.255.255" ) iface_start bash-3.1 will now show "127.0.0.1/8 brd 127.255.255.255" bash-3.0 shows 127.0.0.1/8 brd 127.255.255.255 in other words, 3.1 includes the "" in the output -mike _______________________________________________ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash