export env variables

hi i want to write a shell script to set environment variables . But i am not been able to set that for the current shell instead i have to spawn a new shell. Is there a way to set the env variable for the current shell using shell script in bash shell ?

Thnx

Execute the script with dot followed by space and script name, to export environment variables in current shell

. script_containing_variables

Hi,
what you want to achive is i think you can run the script in the following manner
. script_name
<DOT><SPACE><script_Name>
thise run the script in the current shell
and if you run the script
like ./script_name
this run the script in the child shell and when the script finish the child shell vanishes that's why the environments are not shown in the parent shell
:slight_smile: