Thanks to all for helping.

The source command did the trick, Alex.

         # echo "export VARIABLE='test'" >> test_script
        # chmod 754 test_script
        # ./test_script
        # echo $VARIABLE

Get's changed to:

        # echo "export VARIABLE='test'" >> test_script
        # chmod 754 test_script
        # source ./test_script
        # echo $VARIABLE

Thanks again.

Kris Kerwin

On Monday 02 January 2006 15:53, Alexander Veit wrote:
> Kris Kerwin wrote:
> > I'm having difficulties exporting environment variables from
> > within scripts. The problem doesn't seem to occur when exporting
> > variables from the command line.
>
> The script is executed by a subshell that has it's own environment.
> export does not affect the caller's environment.
> http://www.gnu.org/software/bash/manual/bashref.html#SEC51
>
> The source command (.) may help you.
> http://www.gnu.org/software/bash/manual/bashref.html#SEC56
>
>
> -Alex

Attachment: pgpv8Y3VlBVjN.pgp
Description: PGP signature

Reply via email to