-2
获取这是一个问题,从以下三个找了不同的语法旁白:传递参数通过卷曲获取脚本参数传递给bash脚本通过卷曲
curl https://sdk.cloud.google.com | bash -s arg1 arg2
curl https://sdk.cloud.google.com | bash /dev/stdin arg1 arg2
bash <(curl https://sdk.cloud.google.com) arg1 arg2
...因为没有那些的列出了我试图安装在虚拟机上的gcloud
脚本。
我已经看着这些,但没有找到一个替代第四尝试:
- passing arguments to an interactive program non interactively
- passing parameters to bash when executing a script fetched by curl
- Execute bash script from URL
如果可能,请帮助改善问题并在投票时留下评论。谢谢! – pulkitsinghal
使用'xargs'将参数传递给脚本。 – ceving