From owner-freebsd-questions Mon Apr 3 11:25: 6 2000 Delivered-To: freebsd-questions@freebsd.org Received: from dt051n0b.san.rr.com (dt051n0b.san.rr.com [204.210.32.11]) by hub.freebsd.org (Postfix) with ESMTP id 8107537BF8C for ; Mon, 3 Apr 2000 11:24:57 -0700 (PDT) (envelope-from Doug@gorean.org) Received: from slave (doug@slave [10.0.0.1]) by dt051n0b.san.rr.com (8.9.3/8.9.3) with ESMTP id LAA02288; Mon, 3 Apr 2000 11:24:43 -0700 (PDT) (envelope-from Doug@gorean.org) Date: Mon, 3 Apr 2000 11:24:42 -0700 (PDT) From: Doug Barton X-Sender: doug@dt051n0b.san.rr.com To: Ben Smithurst Cc: Ben Williams , FreeBSD Questions Subject: Re: Re[2]: help! In-Reply-To: <20000403162903.D85754@strontium.scientia.demon.co.uk> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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