Gentoo Archives: gentoo-user

From: Kris Kerwin <kkerwin@×××××××××.com>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Environment variables don't export from within scripts
Date: Mon, 02 Jan 2006 21:40:32
Message-Id: 200601021535.11517.kkerwin@insightbb.com
1 Hi all,
2
3 I'm having difficulties exporting environment variables from within
4 scripts. The problem doesn't seem to occur when exporting variables
5 from the command line.
6
7 To reiterate with an example,
8
9 # export VARIABLE='test'
10 # echo $VARIABLE
11
12 works. However,
13
14 # echo "export VARIABLE='test'" >> test_script
15 # chmod 754 test_script
16 # ./test_script
17 # echo $VARIABLE
18
19 does not work. I've also tried the above while omitting the 'export'
20 command, to the same effect. I'm using bash as my shell. I figured
21 that I would try the same with sh instead, but still nothing.
22
23 I'm using:
24
25 bash-3.0-r12
26
27 Is this a bug, or something that I'm doing wrong? Thanks in advance
28 for your help.
29
30 Kris Kerwin

Replies

Subject Author
Re: [gentoo-user] Environment variables don't export from within scripts Richard Fish <bigfish@××××××××××.org>
Re: [gentoo-user] Environment variables don't export from within scripts Alexander Veit <list@×××××××.de>
Re: [gentoo-user] Environment variables don't export from within scripts Etaoin Shrdlu <shrdlu@×××××××××××××.org>