ash 数组操作()

for myi in 0 1 2 ; do eval mvar$myi=$myidone

myi=1eval newvar=”\$mvar$myi”echo $newvar

eval newvar=”\$mvar0″echo $newvar

———————————————————–

eval mvar0=0eval mvar1=2eval mvar2=3

eval newvar=”\$mvar0″echo $newvareval newvar=”\$mvar2″echo $newvar

————————

for myi in 0 1 2 ; do eval mvar$myi=$myidone

myi=1eval newvar=”\$mvar$myi”echo $newvar

eval newvar=”\$mvar0″echo $newvar

———————————————————–

eval mvar0=0eval mvar1=2eval mvar2=3

eval newvar=”\$mvar0″echo $newvareval newvar=”\$mvar2″echo $newvar