Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64'
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-pc-linux-gnu'
-DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPA$
uname output: Linux ks 4.1.0-0.bpo.2-amd64 #1 SMP Debian 4.1.6-1~bpo8+1
(2015-09-09) x86_64 GNU/Linux
Machine Type: x86_64-pc-linux-gnu
Bash Version: 4.3
Patch Level: 30
Release Status: release
_______________________________________________________________
You can see in the picture below that:
declare -a "$ExecuteThisData"
resulted in executing the string "$ExecuteThisData" without
eval being explicitly invoked. I believe this is unintentional since
this is a variable assignment:
commands to reproduce above:
ExecuteThisData='a=([$(expr 4 - 3)]=$(echo '1ne' | tr '1' 'o'))'
b="$ExecuteThisData"
echo "$b"
echo "$ExecuteThisData"
unset a
declare -a "$ExecuteThisData"
declare -p a
echo ${a[1]}
_______________________________________________________________
Note however that: { declare -a a="$Data" } :
produces the expected result of assigning each space
delimited element to a
separate array element, and does not execute the data.
_____________________________________________
In Summary:
declare -a "$string" # results in execution of $string
declare -a a=($string) # does not result in execution of $string
I can't find the compiler version for bash but it is debian jessie's
compiled version. Your response
would be appreciated.
Michael