I am having a script which sets the application environment. In this script i am sourcing the applications env file, when i am debugging the script i see its executing all the environment values and all the variable values are set properply.
Once this main shell script executes, then all the env variables are set to blank.
How to set the values this values till i logout of the session
I have source the env file as . script.env. it is executing, but the variables are set after the script comes out..
(Assuming that script.env can be found in the current PATH with . script.env).
Sounds like the script.env needs export statements for each environment variable.
MY_VARIABLE="my_value" ; export MY_VARIABLE
Or in some shells just:
export MY_VARIABLE="my_value"