Created
February 22, 2021 13:45
-
-
Save Ragdata/08cae4516f852b6a45ecac3e8b71cb27 to your computer and use it in GitHub Desktop.
Execute a single file from a Github Repo remotely in a single command line
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wget -O - https://raw.githubusercontent.com/<username>/<project>/<branch>/<path>/<file> | bash |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
So outputting to - will actually write the files content to STDOUT and then you simply pipe it to bash or whatever shell you prefer. If you script needs sudo rights you need to do sudo bash at the end so the line becomes:
wget -O - https://raw.githubusercontent.com/<username>/<project>/<branch>/<path>/<file> | sudo bash