我已将超时设置为一个愚蠢的高数字。有没有更好的方法告诉脚本不要超时?
#!/usr/bin/expect
spawn telnet 10.10.10.10
set timeout 200000000
expect "login"
send "user\r"
expect "Password:"
send "password\r"
send "./run/this.sh\r"
Set the timeout
价值-1
set timeout -1
摘录自expect
, man page
如果未使用 timeout 关键字,则在超时时执行隐式 null 操作。默认超时时间为10秒但可以通过命令“set timeout 30”设置为例如30。无限超时可以用值 -1 指定.
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)