for inst in instance{1..10} do eval var1=\$$inst ## to evaluate $inst in assignment you have to use \$$inst arry=($var1) done