![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Calling expect scripts from other expect scripts | seva | Shell Programming and Scripting | 0 | 04-03-2008 10:45 AM |
| tcl/expect | calsum | Shell Programming and Scripting | 7 | 03-25-2008 09:23 PM |
| Expect/Tcl help? | earnstaf | UNIX for Dummies Questions & Answers | 2 | 07-26-2007 07:01 AM |
| Expect and auto expect command | arun_v | Shell Programming and Scripting | 0 | 03-29-2006 04:31 AM |
| Expect with tcl/tk | sanjustudy | Shell Programming and Scripting | 0 | 10-10-2005 02:48 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
|||
|
Tcl expect HELP
In the following "for" loop I assume the the script will expect "anyway", "first" NOT in any paticular order and send "yes" when there found, breaking out of the loop when "$prompt" is found. The way it is working is like 3 individual expect lines, and they MUST be in cronological order. ANY help will be greatly appreciated..
Dave for {} 1 {} { expect -i $id timeout {FAIL} *anyway* send "yes\r\n" send_user "\n$expect_out(buffer),$expect_out(1,string)\n" sleep 1 expect -i $id timeout {FAIL} *first* send "yes\r\n" send_user "\n$expect_out(buffer),$expect_out(1,string)\n" sleep 1 expect -i $id timeout {FAIL} -re $prompt {break} send_user "\n$expect_out(buffer),$expect_out(1,string)\n" } |
|||
| Google The UNIX and Linux Forums |
| Forum Sponsor | ||
|
|