Bash: Run Script on the Fly: Difference between revisions
From WikiMLT
m Стадий: 3 [Фаза:Разработване, Статус:Разутвърден]; Категория:Linux Server |
|||
Line 2: | Line 2: | ||
== Example == | == Example == | ||
The <code>curl</code> command will fetch the installation script from the repository [https://github.com/mrbvrz/segoe-ui-linux github.com/mrbvrz/segoe-ui-linux] and by the help of the | The <code>curl</code> command will fetch the installation script from the repository [https://github.com/mrbvrz/segoe-ui-linux github.com/mrbvrz/segoe-ui-linux] and by the help of the process substitution operator <code><(...)</code> (which will be treated as pseudo-file) the output of <code>curl</code> will be executed via <code>bash</code>.<syntaxhighlight lang="shell" line="1"> | ||
bash <(curl -s https://raw.githubusercontent.com/mrbvrz/segoe-ui-linux/master/install.sh) | bash <(curl -s https://raw.githubusercontent.com/mrbvrz/segoe-ui-linux/master/install.sh) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 9: | Line 9: | ||
* Stack Overflow: [https://stackoverflow.com/questions/5735666/execute-bash-script-from-url Execute bash script from URL] | * Stack Overflow: [https://stackoverflow.com/questions/5735666/execute-bash-script-from-url Execute bash script from URL] | ||
* Ask Ubuntu: [https://askubuntu.com/questions/1086617/dev-fd-63-no-such-file-or-directory "/dev/fd/63 No such file or directory"] | |||
<noinclude> | <noinclude> | ||
<div id='devStage'> | <div id='devStage'>{{devStage | ||
{{devStage | |||
| Прндл = Linux Server | | Прндл = Linux Server | ||
| Стадий = 3 | | Стадий = 3 |
Revision as of 12:45, 28 September 2022
Example
The curl
command will fetch the installation script from the repository github.com/mrbvrz/segoe–ui–linux and by the help of the process substitution operator <(…)
(which will be treated as pseudo-file) the output of curl
will be executed via bash
.
bash <(curl -s https://raw.githubusercontent.com/mrbvrz/segoe-ui-linux/master/install.sh)
References
- Stack Overflow: Execute bash script from URL
- Ask Ubuntu: "/dev/fd/63 No such file or directory"