我想对telnet使用expect 发送命令后 它可能会返回不同的结果 让我说,像以下3种可能性
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!
}
答案 0 :(得分:2)
您要查找的关键字是default
。
expect{
"successful" {}
"normal" {}
default {}
}