#well ihawe something like this Array=(first second) firstoption=(one two) secondoption=(11 22) #now i'm reading like this For segment in "${Array[@]}"; do x=$segment"option" #i'm geing something like firstoption eval t=\${$x[@]} #I hope that t will be array For opt in "${t[@]}" echo opt done done ############### well i hope read like all options... but cant... couse t hawe only one value "one two" or "11 22 " i cnow thats LAME so i'm asking... how i can improve this script ???
Do you mean HTML: Array=(first second) firstoption=(one two) secondoption=(11 22) #now i'm reading like this for segment in "${Array[@]}"; do x=$segment"option" eval t=\${$x[@]} for opt in ${t}; do echo $opt done done
Come to think of it, you may mean this HTML: Array=(first second) firstoption=(one two) secondoption=(11 22) for segment in ${Array[@]}; do x=${segment}option eval t=(\${$x[@]}) for opt in ${t[@]}; do echo $opt done done