threads=`ls t[0-9][0-9]` for thread in \"${threads[@]}\" do echo $thread done
Expected result:
t01 t02 t10
Saying:
threads=`ls t[0-9][0-9]`
or
threads=\`ls t[0-9][0-9]\`
does not create an array.
In order to create an array, say:
threads=(ls t[0-9][0-9])
Moreover, avoid parsing ls.