Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Message-ID: <01b701c276c2$46de4520$78d96f83@pomello>
From: "Max Bowsher" <maxb@ukf.net>
To: "Andrew DeFaria" <Andrew@DeFaria.com>, <cygwin@cygwin.com>
References: <F864nbV6lznZC3c1QRo00001fe2@hotmail.com> <3DB02737.7000406@DeFaria.com>
Subject: Re: About ENV?
Date: Fri, 18 Oct 2002 17:20:30 +0100
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106

Andrew DeFaria <Andrew@DeFaria.com> wrote:
> It doesn't. If "This syntax is useful for setting environment
> variables for one command invocation only" then the echo command
> should have echoed "aaa". Otherwise the syntax is not useful for
> setting environment variables for one command invocation. Perhaps
> what is meant is that this syntax is useful for overriding
> environment variables for one command invocation? However this leaves
> a glaring inconsistancy prone to error if the variable was not set
> already then no override takes place.

Its all quite logical really - when bash sees:
AAA=aaa echo $AAA
It puts AAA=aaa in the enviroment of the echo process if creates (or
simulates with a builtin). *But* it is bash which expands the $AAA, and as
far as bash is concerned, AAA=previous value or not set at all.

Max.


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

