How to control the loop within expect.
- From: hujunfeng@xxxxxxxxx
- Date: 28 Apr 2006 01:18:20 -0700
I just met a problem when I have a loop and an expect in this loop.
for example
for {set i 1} {i<10} {incr i} {
send a commanda
expect {
1 {puts 1}
2 {puts 2}
3 {........}
}
send a commandb
}
when I get the value 1, I will puts 1 and execute the commandb, so as
2.but my question is if I get the value 3, I want to continue the loop
but not execute send the commandb.
I've used break or exit , these all seemed exit the loop.
Do anybody knows this?
Thanks.
.
- Follow-Ups:
- Re: How to control the loop within expect.
- From: Bruce Hartweg
- Re: How to control the loop within expect.
- From: Aric Bills
- Re: How to control the loop within expect.
- Prev by Date: Re: Tcl_Ungets help [long, technical]?
- Next by Date: Re: How to control the loop within expect.
- Previous by thread: How to export postscript from canvas?
- Next by thread: Re: How to control the loop within expect.
- Index(es):
Relevant Pages
|