LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-03-2004, 08:19 AM   #1
alaios
Senior Member
 
Registered: Jan 2003
Location: Aachen
Distribution: Opensuse 11.2 (nice and steady)
Posts: 2,203

Rep: Reputation: 45
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?
 
Old 12-03-2004, 09:01 AM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
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.
 
Old 12-04-2004, 04:19 AM   #3
alaios
Senior Member
 
Registered: Jan 2003
Location: Aachen
Distribution: Opensuse 11.2 (nice and steady)
Posts: 2,203

Original Poster
Rep: Reputation: 45
I am talking about bash scripts.... I need a script that creates some enviaronmental variables when finishes execution
 
Old 12-04-2004, 07:33 AM   #4
LasseW
Member
 
Registered: Oct 2004
Distribution: Fedora 7, OpenSuse 10.2
Posts: 108

Rep: Reputation: 15
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).
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
why do we have to export variables? learnfast Linux - Newbie 2 05-27-2005 08:27 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
Why wont my variables export? suerevans Linux - Newbie 5 04-05-2004 03:46 AM
really easy question: why won't my environment variables export digitized_funk Linux - Newbie 3 10-22-2003 05:22 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:18 PM.

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