-
Notifications
You must be signed in to change notification settings - Fork 52
sourceurl
Ulrich Berntien edited this page May 27, 2019
·
2 revisions
sourceurl - source a script file in-memory from webserver
sourceurl URL
sourceurl loads a file via http or https and stores the content in memory. Then executes the downloaded script via eval.
It works like "source URL" but without source because source supports file names only.
A proxy could be set in https_proxy or http_proxy shell variable.
Argument is
- URL: The URL to load the script file. A http or https based address.
Load a function from a script file. Then execute the function with some arguments.
$ source https://raw.githubusercontent.com/zMarch/Orc/master/resources/echo_function.sh
$ echo_function arg1 arg2
Load the script file via proxy.
$ http_proxy=http://proxy.example.com:8080
$ source https://raw.githubusercontent.com/zMarch/Orc/master/resources/echo_function.sh
Is there a way to do a remote "source" of a bash script file to set variable ?