我想对 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!
}
最佳答案
您要查找的关键字是default
。
expect{
"successful" {}
"normal" {}
default {}
}
关于linux - else 字符串匹配在 expect 中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13982310/