In this test I'm expecting it to print "var1 is 999".
user@penguin:~$ for num in {1..3}; do export var$num=9999 ; echo var$num is $var$num ; done
var1 is 1
var2 is 2
var3 is 3
user@penguin:~$ echo $var1 $var2 $var3
9999 9999 9999
This prints the PID instead of the variabled named by the two variable names.
user@penguin:~$ for num in {1..3}; do export var$num=9999 ; echo var$num is $$var$num ; done
var1 is 316var1
var2 is 316var2
var3 is 316var3