LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   export variables (https://www.linuxquestions.org/questions/linux-general-1/export-variables-262121/)

alaios 12-03-2004 08:19 AM

export variables
 
Hi i need to set some variables....

The problem is that the variables are denoted inside a script file....
Inside the script file i export some variables export TEST=/bin/ls

i execute the script as sh myscript.sh
after the script finish execution the variables are not set... I think that the problem is that the children terminates...

Any suggestion?

trickykid 12-03-2004 09:01 AM

If these are variables that your user needs set, just add them to their .bashrc or .bash_profile or even the /etc/profile file which is the global one, why create a script to run yourself each time? Better details get better reponses.

alaios 12-04-2004 04:19 AM

I am talking about bash scripts.... I need a script that creates some enviaronmental variables when finishes execution

LasseW 12-04-2004 07:33 AM

Run the script with 'source myscript.sh'. The source command will run the script in your interactive shell (unlike sh which launches a new shell).


All times are GMT -5. The time now is 10:04 PM.