4

我想在发送命令后对 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!
}
4

1 回答 1

3

您要查找的关键字是default.

expect{
   "successful" {}
   "normal" {} 
   default {}
}
于 2012-12-21T01:42:42.997 回答