Gentoo Archives: gentoo-user

From: Willie Wong <wwong@×××××××××.EDU>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Environment variables don't export from within scripts
Date: Tue, 03 Jan 2006 00:41:44
Message-Id: 20060103003833.GA17818@princeton.edu
In Reply to: Re: [gentoo-user] Environment variables don't export from within scripts by Kris Kerwin
1 On Mon, Jan 02, 2006 at 04:30:09PM -0600, Penguin Lover Kris Kerwin squawked:
2 > Thanks to all for helping.
3 >
4 > The source command did the trick, Alex.
5 >
6 > ?# echo "export VARIABLE='test'" >> test_script
7 > ????????# chmod 754 test_script
8 > ????????# ./test_script
9 > ????????# echo $VARIABLE
10 >
11 > Get's changed to:
12 >
13 > # echo "export VARIABLE='test'" >> test_script
14 > ????????# chmod 754 test_script
15 > ????????# source ./test_script
16 > ????????# echo $VARIABLE
17
18 Or, you can run it as commands to the current shell by
19 # . test_script
20 samething as `source', really...
21
22 W
23 --
24 Pintsize: Hello Marten! I wasn't expecting you home this soon. We're playing
25 Trolls & Flame-Wars! It's an Internet message-board based role playing game.
26 Sortir en Pantoufles: up 51 days, 16:58
27 --
28 gentoo-user@g.o mailing list