Reputation: 113
I want to use expect for telnet after sending a command it may return different results let me say, like the following 3 possibilities
1 successful
2 normal
3 there are something wrong...blabla
you can refer to ....blabla
expect{
"successful" {}
"normal" {}
#here, for the third possibility, I want to use something like "else", so what should I put here? thanks!
}
Upvotes: 4
Views: 2663
Reputation: 247240
The keyword you're looking for is default
.
expect{
"successful" {}
"normal" {}
default {}
}
Upvotes: 3