LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 11-27-2001, 02:59 AM   #1
Barbarian
Member
 
Registered: Nov 2001
Location: Malaysia and Manchester
Distribution: Red Hat
Posts: 46

Rep: Reputation: 15
Question BASH variable export


I have a BASH script that creates a standard environment for a new account, creating new directories and populating them with files etc...

I can write my shell variable/symbols to the .bashrc file, but is there anyway of executing/exporting these variables I've created on the fly without having to logout and then back in again?

Unless I've done it wrong, the EXPORT function doesn't seem to export to the running shell.
 
Old 11-27-2001, 05:46 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 39,853

Rep: Reputation: 1121Reputation: 1121Reputation: 1121Reputation: 1121Reputation: 1121Reputation: 1121Reputation: 1121Reputation: 1121Reputation: 1121
a statement such as

PATH=$PATH:/usr/local/netscape
export PATH

will definitely work
 
Old 11-27-2001, 08:37 PM   #3
Barbarian
Member
 
Registered: Nov 2001
Location: Malaysia and Manchester
Distribution: Red Hat
Posts: 46

Original Poster
Rep: Reputation: 15
Thumbs up

Thanks for that.

I suppose it would help if I actually did what the manual told me!

 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to export environment variable from a bash script dimaash Linux - Newbie 20 08-09-2011 07:12 AM
Export variable loopoo Linux - Newbie 4 08-08-2005 04:08 AM
cannot export result from awk into a variable in a bash script Emmanuel_uk Linux - Newbie 4 03-07-2005 01:54 AM
Export Shell Variable not working maxhugen Linux - Newbie 6 01-06-2005 10:12 PM
BASH export command galalleni Slackware 4 09-08-2003 12:44 AM


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

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration