所以我使用的是用go编写的开放源码软件,我没有接触过它。我正在尝试自动化那个脚本。
因此,脚本是如何工作的,用于确认用户获取用户输入、执行代码的calling_go_code消息。
我正在尝试自动化这个脚本。
到目前为止,这是我尝试过的,sh test.sh Param1
当我运行脚本时
echo "hello"
calling_go_code上面的代码要求输入一些参数作为test.sh
sh test.sh Param1
echo "hello"
calling_go_code -- $1发布于 2019-01-30 08:07:18
基于@RichardHuxton的帖子。这就是我正在使用的解决方案
#!/usr/bin/expect -f
set alias [lindex $argv 1]
set input [lindex $argv 0]
set timeout -1
COMMAND I AM USING
expect {
"*CONFIRMATION MESSAGE 1" { send -- $alias\r }
exp_continue
}
expect {
"*CONFIRMATION MESSAGE 2" { send -- $alias\r }
exp_continue
}
expect eof呼叫bot
./bot param1 param2期望的依赖性
https://stackoverflow.com/questions/54418751
复制相似问题