【问题标题】:Expect/TCL telnet proc does not wait for the promptExpect/TCL telnet proc 不等待提示
【发布时间】:2010-12-17 00:03:27
【问题描述】:

我有一个 Expect proc,它发送 telnet 登录命令和发送命令。在 telnet proc 里面我做了一个 TFTP 。文件大小为 10MB。 但是telent提示不会等到提示出现。它等待超时时间 并脱落。

有什么方法可以等待 Expect 的提示。

问候, 米通

【问题讨论】:

  • Expect 开发提示:exp_internal 1 向您展示 Expect 所见

标签: tcl expect


【解决方案1】:

如果 tftp 文件传输的时间比 Expect 的默认超时时间(10 秒)长,您需要先设置更长的超时时间。例如。对于 60 秒的超时,请使用以下命令开始您的脚本:

set timeout 60

要获得更详细的帮助,您最好发布您的 Expect 脚本。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2016-10-30
    • 1970-01-01
    • 2020-08-24
    • 2011-11-14
    • 1970-01-01
    • 2013-08-26
    • 2017-05-11
    • 2015-07-18
    相关资源
    最近更新 更多