Bash: Run Script on the Fly: Difference between revisions

From WikiMLT
m (Стадий: 5 [Фаза:Утвърждаване, Статус:Авторизиран]; Категория:Linux Server)
Line 2: Line 2:


== Example ==
== Example ==
The <code>curl</code> command below 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 file substitution operator <code><()</code> the output of curl 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 file substitution operator <code><()</code> 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>

Revision as of 00:45, 28 September 2022

Ex­am­ple

The curl com­mand will fetch the in­stal­la­tion script from the repos­i­to­ry github​.com/​m​r​b​v​r​z​/​s​e​g​o​e​–​u​i​–​linux and by the help of the file sub­sti­tu­tion op­er­a­tor <() the out­put of curl will be ex­e­cut­ed via bash.

bash <(curl -s https://raw.githubusercontent.com/mrbvrz/segoe-ui-linux/master/install.sh)

Ref­er­ences