I wrote the below code and try to execute it. But i face the "invalid command name "do" while executing do {"
code:
#!/usr/bin/expect
set val 0;
set input 5;
do {
puts "\nval = $val"
set input [expr $input-1];
set val [expr $val+1];
} while {input}
Please let me know to fix this issue. Does do-while exist in Expect script?