Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 3 Apr 2000 11:24:42 -0700 (PDT)
From:      Doug Barton <Doug@gorean.org>
To:        Ben Smithurst <ben@scientia.demon.co.uk>
Cc:        Ben Williams <williamsl@home.com>, FreeBSD Questions <FreeBSD-Questions@FreeBSD.org>
Subject:   Re: Re[2]: help!
Message-ID:  <Pine.BSF.4.21.0004031122510.2238-100000@dt051n0b.san.rr.com>
In-Reply-To: <20000403162903.D85754@strontium.scientia.demon.co.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 3 Apr 2000, Ben Smithurst wrote:

> Ben Williams wrote:
> 
> >    Just out of curiosity why are all the examples I ever see re
> > setting environment variables in bash listed as:
> > 
> > VARNAME=value; export VARNAME
> > 
> > instead of:
> > 
> > export VARNAME=value
> > ?
> 
> export VARNAME=value is supposedly not guaranteed to work in all
> Bourne-type shells.

	It doesn't work in "classic" Bourne shell (like the one found on
Sun) but as long as the script you are working on will only be run in
bash, or on a modern Bourne shell system (like freebsd) then there is no
reason not to use it yourself.

	If on the other hand the script is being used for teaching or
illustration purposes, it's better to use a syntax that's guaranteed to be
portable across platforms. 

Doug
-- 
    "So, the cows were part of a dream that dreamed itself into
existence? Is that possible?" asked the student incredulously.
    The master simply replied, "Mu."




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0004031122510.2238-100000>