我有一个运行良好的期望脚本,但是在执行一些命令后它停止了。
脚本:#!/usr/bin/expect
eval spawn telnet Proc_m0_s1 8000
expect ">"
send "cd CLI/Processors\r"
expect ">"
send "getprocessorinfo Proc_m0_s5\r"
expect ">"
send "getprocessorinfo Proc_m0_s1\r"
expect ">"
send "getprocessorinfo Proc_m0_s7\r"
expect ">"
send "getprocessorinfo Proc_m0_s3\r"
expect ">"
send "getprocessorinfo Proc_m0_s17\r"
expect ">"
send "getprocessorinfo Proc_m0_s19\r"
expect ">"
send "getprocessorinfo Proc_m1_s5\r"
expect ">"
send "getprocessorinfo Proc_m1_s7\r"
expect ">"
send "getprocessorinfo Proc_m1_s9\r"
expect ">"
send "getprocessorinfo Proc_m1_s11\r"
expect ">"
send "getprocessorinfo Proc_m1_s13\r"
expect ">"
send "getprocessorinfo Proc_m1_s15\r"
expect ">"
send "getprocessorinfo Proc_m1_s17\r"
expect ">"
send "getprocessorinfo Proc_m1_s19\r"
expect ">"
send "getprocessorinfo Proc_m1_s21\r"
expect ">"
send "getprocessorinfo Proc_m1_s23\r"
expect ">"
send "getprocessorinfo Proc_m2_s1\r"
expect ">"
send "exit\r"
它像这样停止:
$ /CLI/Processors> getprocessorinfo Proc_m1_s23
我试过删除一些命令,但它总是停止!