如何在bash脚本中嵌入答案提示

时间:2018-02-18 16:59:30

标签: bash command-prompt

我正在从shell脚本自动化二进制安装。二进制文件询问4个问题,如:

combo.currentIndexChanged.connect(
    lambda ix, p=position: self.logChange(comboList['combo{0}'.format(p)]))

我正在尝试的是:

Do you want to configure proxy settings (yes/no)? yes

Examples:
http://squid.mycompany.com:3128
https://username:password@squid.mycompany.com:443

proxy url: http://proxy.abc.company.net:8080
These are your proxy settings:
protocol: "http"
host: "proxy.abc.company.net"
port: "8080"
Are these correct? (yes/no) yes
We recommend using NTPD to keep the time in sync.
Do you want to install and configure this now (yes/no)? no

但我收到的错误是:

echo -e "yes\n'"'$PROXY_URL'"'\nyes\nno\n" | bash installer-new-kvm-debian.sh

知道我在做什么或者有什么其他方法可以实现同样的目标吗?

0 个答案:

没有答案
相关问题