LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 04-08-2006, 09:12 AM   #1
HGeneAnthony
Member
 
Registered: Mar 2003
Posts: 178

Rep: Reputation: 30
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?
 
Old 04-08-2006, 09:18 AM   #2
HGeneAnthony
Member
 
Registered: Mar 2003
Posts: 178

Original Poster
Rep: Reputation: 30
Reply

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.
 
Old 05-20-2006, 04:47 PM   #3
tgo
Member
 
Registered: Dec 2004
Posts: 125

Rep: Reputation: 15
EDIT:

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.

Last edited by tgo; 05-20-2006 at 04:50 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to export variables declared in a script joehansen12 Linux - Newbie 2 10-26-2005 02:25 PM
why do we have to export variables? learnfast Linux - Newbie 2 05-27-2005 08:27 AM
export variables alaios Linux - General 3 12-04-2004 07:33 AM
keep my export variables captain-cat Linux - Newbie 9 06-23-2004 05:22 AM
export variables radnix Linux - General 2 04-28-2004 06:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 11:53 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration