1 |
On 1/2/06, Kris Kerwin <kkerwin@×××××××××.com> wrote: |
2 |
> Hi all, |
3 |
> |
4 |
> I'm having difficulties exporting environment variables from within |
5 |
> scripts. The problem doesn't seem to occur when exporting variables |
6 |
> from the command line. |
7 |
> |
8 |
> To reiterate with an example, |
9 |
> |
10 |
> # export VARIABLE='test' |
11 |
> # echo $VARIABLE |
12 |
> |
13 |
> works. However, |
14 |
> |
15 |
> # echo "export VARIABLE='test'" >> test_script |
16 |
> # chmod 754 test_script |
17 |
> # ./test_script |
18 |
> # echo $VARIABLE |
19 |
|
20 |
On Linux/Unix, environment variables a passed from parent processes to |
21 |
children, never the other way around. This is unlike windows where |
22 |
environment variables are shared by all processes. |
23 |
|
24 |
So this is the expected and correct behavior, and thus, not a bug. |
25 |
|
26 |
-Richard |
27 |
|
28 |
-- |
29 |
gentoo-user@g.o mailing list |