![预先提供 Linux 程序的答案](https://linux22.com/image/570716/%E9%A2%84%E5%85%88%E6%8F%90%E4%BE%9B%20Linux%20%E7%A8%8B%E5%BA%8F%E7%9A%84%E7%AD%94%E6%A1%88.png)
当我运行以下命令时:
yiic webapp main /home/david123/domains/david123.servehttp.com/public_html/main
它等待我的回答:
Create a Web application under '/home/david123/domains/david123.servehttp.com/public_html/main'? [Yes|No]
我希望预先提供命令的答案,而不是每次运行此命令时都输入“是/否”。我应该在原始命令后附加什么?
yiic webapp main /home/david123/domains/david123.servehttp.com/public_html/main
答案1
您应该在前面加上 的调用yes
。
yes Yes | yiic webapp main /home/david123/domains/david123.servehttp.com/public_html/main