我想为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 - 其他字符串匹配期望,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/13982310/

10-12 22:39