How to create a "loop" statement within an {expect} script? -


assumption is, script

#!/usr/bin/expect set "__test__" 

i create loop inside script can print value for

 $a 

with number infront of based on loop.

so if wanted loop 3 times.. end product become:

 1:__test__  2:__test__  3:__test__ 

you can use for

#!/usr/bin/expect set "__test__" {set x 0} {$x<3} {incr x} {    puts "$x:$a" } 

see more info in tcl commands because expect extension tcl language.


Comments

Popular posts from this blog

java - Run a .jar on Heroku -

java - Jtable duplicate Rows -

validation - How to pass paramaters like unix into windows batch file -