更新时间:2023-09-18 10:31:28
您可以尝试 expect
工具,该工具用于将输入自动提供给交互式程序.尝试从这样的事情开始:
You can try expect
tool which is used to feed input automatically to an interactive program. Try to begin with something like this:
#!/usr/bin/expect
set timeout 10
spawn "PATH_TO/a.sh"
expect "You want to Proceed"
send "y\r"
interact