public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Alexander Veit" <list@nezwerg.de>
To: <gentoo-user@lists.gentoo.org>
Subject: Re: [gentoo-user] Environment variables don't export from within scripts
Date: Mon, 2 Jan 2006 22:53:38 +0100	[thread overview]
Message-ID: <017301c60fe6$fd276530$0201010a@sampaw.com> (raw)
In-Reply-To: <200601021535.11517.kkerwin@insightbb.com>

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

-- 
gentoo-user@gentoo.org mailing list



  parent reply	other threads:[~2006-01-02 22:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-02 21:35 [gentoo-user] Environment variables don't export from within scripts Kris Kerwin
2006-01-02 21:48 ` Richard Fish
2006-01-02 21:53 ` Alexander Veit [this message]
2006-01-02 22:30   ` Kris Kerwin
2006-01-03  0:38     ` Willie Wong
2006-01-02 22:16 ` Etaoin Shrdlu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='017301c60fe6$fd276530$0201010a@sampaw.com' \
    --to=list@nezwerg.de \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox