set environment variables calling script file

Posted by sandeep on Stack Overflow See other posts from Stack Overflow or by sandeep
Published on 2011-02-22T06:52:23Z Indexed on 2011/02/23 7:25 UTC
Read the original article Hit count: 391

Filed under:
|
|
|

I have a requirement where I have to set environment variables calling a script file eg:set_env.sh. set_env.sh contains all the environment variables.

export SCRIPT_DIR=/e/scripts/
...

when I call the set_env.sh from my code the variables are available in that file itself. They are not available in file where I have called the script.

What should be done so that environment variables can be retained and can be used in file which calls set_env.sh.

Thanks, Sandeep M.

© Stack Overflow or respective owner

Related posts about unix

Related posts about variables