Skip to content

sourceurl

Ulrich Berntien edited this page May 27, 2019 · 2 revisions

sourceurl

Name

sourceurl - source a script file in-memory from webserver

Synopsis

sourceurl URL

Description

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.

Examples

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

See

Is there a way to do a remote "source" of a bash script file to set variable ?

Clone this wiki locally