Expect/TCL telnet proc不等待提示 [英] Expect/TCL telnet proc does not wait for the prompt

查看:68
本文介绍了Expect/TCL telnet proc不等待提示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Expect proc,它发送用于telnet登录的命令并发送命令.在telnet proc内,我执行TFTP.文件大小为10MB.但是,telent提示不会等到提示出现时才等待.它会等待超时时间并脱落.

I have a Expect proc that sends command for telnet login and send commands. Inside the telnet proc I do a TFTP . The size of the file is 10MB. But the telent prompt does not wait until the prompt appears .It waits for the timeout period and comes off.

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

is there any way we can wait for the prompt in Expect .

关于,Mithun

推荐答案

如果tftp文件传输花费的时间比Expect的默认超时时间(10秒)长,则需要首先设置更长的超时时间.例如.如果超时60秒,请使用以下命令启动脚本:

If the tftp file transfer takes longer than Expect's default timeout (10 seconds) you will need to set a longer timeout first. Eg. for a 60-second timeout, start your script with:

set timeout 60

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

For more detailed help you had better post your Expect script.

这篇关于Expect/TCL telnet proc不等待提示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆