bash script -->> arrays, Indirect Variable References--->> help :)
#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 ???
|
Recent comments
7 hours 14 min ago
12 hours 6 min ago
20 hours 59 min ago
21 hours 58 min ago
1 day 1 hour ago
1 day 2 hours ago
1 day 6 hours ago
1 day 13 hours ago
1 day 22 hours ago
2 days 17 min ago