-   Debian (
-   -   How can I export my variables from a script? (

HGeneAnthony 04-08-2006 10:12 AM

How can I export my variables from a script?
I'm trying to set up OpenVPN and the tutorial told me to edit my vars file, then I would execute it to set environment variables for the next script. However, even though I'm using the export command the variables are not setting as environment variables. I even created a generic simple script that just set export name = Gene for a test and that wouldn't echo a result after I ran it. I know you can set global variables in /etc/bash.bashrc but I can't seem to set them anywhere else. I noticed this with Debian and Ubuntu and I'm wondering if there's a reason they set it this way? Is there a way to override it?

HGeneAnthony 04-08-2006 10:18 AM

Well I found out why debian works the way it does however I still would like to know how to make it so certain files can set environment variables.

tgo 05-20-2006 05:47 PM


I was having the same issues when I found another post saying to use source script instead of running it so its working fine now.

All times are GMT -5. The time now is 05:06 AM.