Bash: Run Script on the Fly

From WikiMLT
Revision as of 17:46, 28 September 2022 by Spas (talk | contribs) (Стадий: 4 [Фаза:Авторизиране, Статус:Разработен]; Категория:Linux Server)

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 process sub­sti­tu­tion op­er­a­tor <(…) (which will be treat­ed as pseu­do-file) the out­put of curl will be ex­e­cut­ed 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

Ref­er­ences