"for i in $var" syntax loops over words in the variable, and assigns each word to the variable i on each iteration of the loop. So if "var" looked like:
"one two three"
Then "for i in $var; do echo $i; done" would look like:
Three iterations of the loop, with the current word being assigned to the variable i on each iteration.
What you need is this style for loop:
for ((i=0; i<$num2; i++)); do
Which, if num2=5, would look like: