HOWTO set Environment

Paul Howarth paul at city-fan.org
Wed Oct 13 07:48:17 UTC 2004


On Wed, 2004-10-13 at 08:43, fellons wrote:
> I'm forgot to write than I make "export TEMP".
> Are the same thing of "export set TEMP=/tmp" ?

Yes;

TEMP=/tmp; export TEMP

is equivalent to:

export TEMP=/tmp

> On Wed, 13 Oct 2004 15:22:27 +0800 (HKT), HaJo Schatz <hajo at hajo.net> wrote:
> > fellons said:
> > > Hi list.
> > >
> > > Someone can tell me how set an environment variable ?
> > >
> > > I try to set, on <userhome>/.bash_profile something like
> > > TEMP=/tmp
> > 
> > "export set TEMP=/tmp"
> > 
> > Try by executing ~/.bash_profile on the shell and then "echo $TEMP".

In order to "see" the variable setting you'll need either to re-log in
as that user, or use ". ~/.bash_profile" rather than just
"~/.bash_profile". Simply executing the profile will not set the
variable in your current shell, you need to "source" it instead using
".".

Paul.
-- 
Paul Howarth <paul at city-fan.org>




More information about the fedora-list mailing list