Bash: Run Script on the Fly: Difference between revisions
From WikiMLT
m Стадий: 3 [Фаза:Разработване, Статус:Разутвърден]; Категория:Linux Server |
m Стадий: 6 [Фаза:Утвърждаване, Статус:Утвърден]; Категория:Linux Server |
||
(3 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
== 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 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"> | 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. | bash <(curl -s https://example.com/path-to/raw/install.sh) | ||
</syntaxhighlight><syntaxhighlight lang="shell" line="1"> | |||
curl -s https://example.com/path-to/raw/install.sh | bash -s arg1 arg2 | |||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 15: | Line 17: | ||
{{devStage | {{devStage | ||
| Прндл = Linux Server | | Прндл = Linux Server | ||
| Стадий = | | Стадий = 6 | ||
| Фаза = | | Фаза = Утвърждаване | ||
| Статус = | | Статус = Утвърден | ||
| ИдтПт = Spas | | ИдтПт = Spas | ||
| РзбПт = | | РзбПт = Spas | ||
| АвтПт = Spas | | АвтПт = Spas | ||
| УтвПт = | | УтвПт = {{REVISIONUSER}} | ||
| ИдтДт = 28.09.2022 | | ИдтДт = 28.09.2022 | ||
| РзбДт = | | РзбДт = 28.09.2022 | ||
| АвтДт = 28.09.2022 | | АвтДт = 28.09.2022 | ||
| УтвДт = | | УтвДт = {{Today}} | ||
| ИдтРв = [[Special:Permalink/32026|32026]] | | ИдтРв = [[Special:Permalink/32026|32026]] | ||
| РзбРв = | | РзбРв = [[Special:Permalink/32052|32052]] | ||
| АвтРв = | | АвтРв = [[Special:Permalink/32054|32054]] | ||
| РзАРв = [[Special:Permalink/32049|32049]] | | РзАРв = [[Special:Permalink/32049|32049]] | ||
| УтвРв = | | УтвРв = {{REVISIONID}} | ||
| РзУРв = [[Special:Permalink/32051|32051]] | | РзУРв = [[Special:Permalink/32051|32051]] | ||
}} | }} | ||
</div> | </div> | ||
</noinclude> | </noinclude> |
Latest revision as of 16:46, 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://example.com/path-to/raw/install.sh)
curl -s https://example.com/path-to/raw/install.sh | bash -s arg1 arg2
References
- Stack Overflow: Execute bash script from URL
- Ask Ubuntu: "/dev/fd/63 No such file or directory"