The issue about assigning arrays to variables in bash script seems rather complicated:
a=(\"a\" \"b\" \"c\") b=$a echo ${a[0]} echo ${a[1]} echo ${b[0]} echo
If you want to copy a variable that holds an array to another name, you do it like this:
a=('a' 'b' 'c') b=( "${a[@]}" )