我有一个脚本(让我们命名它parent.sh
),它根据输入参数调用其他一些脚本。
最后,它调用脚本child.sh
。
child.sh
请求用户输入,以防它发现某些文件已经存在:
"Would you like to replace the configuration file with a new one? (Yes/No/Abort): "
Run Code Online (Sandbox Code Playgroud)
现在,我想这样做是为了模拟的按键“Y” /“Y”里面parent.sh
的脚本,以便始终覆盖文件。
我无法使用expect
.
我怎样才能做到这一点?
bash ×1