I am doing something like this:
#!/usr/bin/expect -f
if {$out != ""} {
send_user $out
}
But it doesn't work. Error message:
can't read "out": no such variable
while executing
"if {$out != ""} {
send_user $out
}"
(file "./test" line 3)