You cannot set variables in the parent environment of a process. You can only set the current process environment or prepare the environment for your process children.
, script , . :
source your_script.sh
. your_script.sh
( ). your_script.sh , , script, .
, , script, , , , . , script - , . , (, - /var).
, , , . . , bash /etc/profile script $HOME/.bash_profile ( $HOME/.bash_login $HOME/.profile) script. . bash - . , .