Expect/TCL telnet proc does not wait for the prompt

倖福魔咒の 提交于 2021-01-28 10:54:06

问题


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.

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

Regards, Mithun


回答1:


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

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



来源:https://stackoverflow.com/questions/1741137/expect-tcl-telnet-proc-does-not-wait-for-the-prompt

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!