Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save techpulsetoday/3e46264f8a4194763654a04d0b0dc683 to your computer and use it in GitHub Desktop.
Save techpulsetoday/3e46264f8a4194763654a04d0b0dc683 to your computer and use it in GitHub Desktop.
Execute bash script directly from URL

Execute bash script directly from a URL

bash <(curl -Ls https://example.com/script.sh)
bash <(curl -Ls https://raw.githubusercontent.com/techpulsetoday/scripts/master/vim-bootstrap)

Passing Parameters to bash when executing a script fetched by curl

curl https://example.com/script.sh | bash -s arg1 arg2 arg3
curl https://raw.githubusercontent.com/techpulsetoday/scripts/master/virtualhost | sudo bash -s create local.techpulsetoday.com /var/www/html/local.techpulsetoday.com/
curl https://raw.githubusercontent.com/techpulsetoday/scripts/master/virtualhost | sudo bash -s delete local.techpulsetoday.com /var/www/html/local.techpulsetoday.com/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment