This question already has an answer here:
curl as in:
bash <(curl -s https://raw.githubusercontent.com/user/repo/master/script.sh | tr -d '\r')
I executed some remote script.
The remote script includes the following two aspects:
1) The command:
wget -P ~/myAddons/ https://raw.githubusercontent.com/user/repo/master/appendix.sh
source ~/myAddons/appendix.sh command:
appendix.sh, includes some Bash aliases.
After executing the remote script, I tried to use some aliases from
appendix.sh. None worked.
Only after manually executing
source ~/myAddons/appendix.sh, the aliases worked.
- I checked at least 3 times that both the remote script's
sourcecommand, and the manual command, are the same.
Why did the execution of
source ~/myAddons/appendix.sh directly from the remote script, fail, while the manually it worked, and what's the right way to cope with that?