This is the full script:
#!/usr/bin/expect
set a1 "aaa"
set a2 "bbb"
set a3 "ccc"
for {set b 1} {$b<4} {incr b} {
send a$b
}
the output is:
a1a2a3
what i wanted was the values for
$a1
$a2
$a3
how to fix ?
someone recommended "eval"
eval send "a$b"
which does not seem to be working, outputs same thing as above.