▲ | ffsm8 3 days ago | |||||||
Mmh, that's kinda... Exactly what `source` is. It's just rarely used beyond dotfiles because... Well.. it inherits all variables etc https://docs.vultr.com/how-to-use-the-source-command-in-bash If you want to make the transition explicit at the end of the script, you can do what the sister comment did, essentially "source <(bash the-script|grep -Pom "xx inherited variables\n(.*?)\n yy inherited variables")" | ||||||||
▲ | donatj 3 days ago | parent [-] | |||||||
Not at all. The source command is basically just an include, executing shell commands in the current scope. I'm talking about inheriting the environmental state of any subprocess. You can't source a binary. | ||||||||
|