bash: source from URL
--------------------------------------------------
Rise to the top 3% as a developer or hire one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------
Music by Eric Matyas
https://www.soundimage.org
Track title: Beneath the City Looping
--
Chapters
00:00 Bash: Source From Url
00:40 Accepted Answer Score 20
01:03 Thank you
--
Full question
https://superuser.com/questions/255260/b...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#bash #unix #shellscript #bashrc #curl
#avk47
Rise to the top 3% as a developer or hire one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------
Music by Eric Matyas
https://www.soundimage.org
Track title: Beneath the City Looping
--
Chapters
00:00 Bash: Source From Url
00:40 Accepted Answer Score 20
01:03 Thank you
--
Full question
https://superuser.com/questions/255260/b...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#bash #unix #shellscript #bashrc #curl
#avk47
ACCEPTED ANSWER
Score 20
You can use process substitution with source
:
source <(curl -s http://example.com/foo)
Note: I consider directly running code retrieved over the internet to be a serious security risk. It's probably less risky if this is done over an internal network (depending on its overall security).