【发布时间】:2017-09-14 10:14:46
【问题描述】:
我想自动化一系列命令,其中一个需要多个用户输入是/否。如何编写脚本以便我的脚本自动选择多个答案?
来自命令checkinstall的示例:
Do you want me to list them? [n]:(我想在这里回答 no/n)
Should I exclude them from the package? [n]:(我想在这里回答yes/y)
如您所见,checkinstall 命令需要多个输入。当我只想给出命令 1 输入时,我使用 this 方法。
【问题讨论】: