开发者

Expect/TCL telnet proc does not wait for the prompt

开发者 https://www.devze.com 2022-12-11 07:37 出处:网络
I have a Expect proc that sends co开发者_JAVA百科mmand for telnet login and send commands. Inside the telnet proc I do a TFTP . The size of the file is 10MB.

I have a Expect proc that sends co开发者_JAVA百科mmand 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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消