On Kubuntu 15.10
echo $BASH_VERSION
4.3.42(1)-release
I try
reps=1
threads={1}{10..60..10}
for((r=0;r<$reps;r++))
do
tCount=0
for t in $threads
do
echo "t=$t, tCount=${tCount}"
#do something funny with it
((tCount++))
done
done
and it produces a single line
t={1}{10..60..10}, tCount=0
How do I get this to work?
edit
I expect
t=1, tCount=0
t=10, tCount=1
t=20, tCount=2
t=30, tCount=3
t=40, tCount=4
t=50, tCount=5
t=60, tCount=6
update
note that threads=({1}{10..60..10})
and then for t in ${threads[@]}
will prefix the 10..60..10
range with the string {1}
(i.e. {1}10,{1}20,..,{1}60
)