Passing parameters to bash when executing a script fetched by curl

前端 未结 3 906
小鲜肉
小鲜肉 2020-12-07 09:18

I know how to execute remote Bash scripts like this:

curl http://example.com/script.sh | bash

or

bash < <( curl http:         


        
3条回答
  •  旧时难觅i
    2020-12-07 09:41

    Other alternatives:

    curl http://foo.com/script.sh | bash /dev/stdin arguments
    bash <( curl http://foo.com/script.sh ) arguments
    

提交回复
热议问题