9

如何在shell脚本设置当前shell的环境变量

 3 years ago
source link: https://www.myfreax.com/can-a-shell-script-set-environment-variables-of-the-calling-shell/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
更新于 2021/08/14 |  创建于 2021/08/13

如何在shell脚本设置当前shell的环境变量

Your shell process has a copy of the parent's environment and no access to the parent process's environment whatsoever. When your shell process terminates any changes you've made to its environment are lost. Sourcing a script file is the most commonly used method for configuring a shell environment, you may just want to bite the bullet and maintain one for each of the two flavors of shell.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK