The "echo" below is failing and I am too retarded to figure out why. I am simply trying to echo all of the array members in my loop.
#!/bin/bash
foo=bar1,bar2
for i in ${foo//,/" "}
do
declare -a ${i}='(null null null null)'
echo ${i[*]}
done
Thanks for any help!