Hi,
I construct a bash script to finish some tasks. One of the task is to set up some environment variables. There is already one script file to complete the environment variables setting work. I am not able to know the detail of how to set these variables. So, I may just need to call this script in my script file.
Assume that my script file is myscript.sh, and another script file is setvar.sh. I start a terminator and run my script. So, the process tree will be like this:
init-login-bash-myscript.sh-setvar.sh
Here is the difficulty: I want these variables to be available in my working shell. But it seems that when I run my script, a child shell will be created, and these variables (set in the setvar.sh) are only available for this child shell.
So, what can I do in my script to let these variables become available for the whole working shell, other than the child shell that is created to run my script.