我正在尝试使用 expect 来自动接受在 --more-- 中提示的 EULA。
#!/usr/bin/expect
spawn "./greenplum-perfmon-web-4.1.2.0-build-2-RHEL5-x86_64.bin"
expect "--More--"
send "q"
expect "*****"
send "yes"
expect "*****"
send ""
expect "*****"
send "yes"
这不起作用,我不确定为什么。脚本总是在 --More-- 提示符处停止,第二次我单击任何它立即处理脚本的其余部分。
我试过
expect -exact "--More--"
和
expect "the Customer"
(what is written above the --More--)
最佳答案
尝试将 $MORE
设置为类似 -99999999
的值,这样 more
提示永远不会出现。
关于linux - 期待和——更多——,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9484353/