delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/10/18/11:23:25

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
To: cygwin AT cygwin DOT com
X-Injected-Via-Gmane: http://gmane.org/
Path: not-for-mail
From: Andrew DeFaria <Andrew AT DeFaria DOT com>
Subject: Re: About ENV?
Date: Fri, 18 Oct 2002 08:22:31 -0700
Lines: 25
Message-ID: <3DB02737.7000406@DeFaria.com>
References: <F864nbV6lznZC3c1QRo00001fe2 AT hotmail DOT com>
NNTP-Posting-Host: dsl-64-195-250-225.telocity.com
Mime-Version: 1.0
X-Trace: main.gmane.org 1034954519 20199 64.195.250.225 (18 Oct 2002 15:21:59 GMT)
X-Complaints-To: usenet AT main DOT gmane DOT org
NNTP-Posting-Date: Fri, 18 Oct 2002 15:21:59 +0000 (UTC)
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0
X-Accept-Language: en,ru

John Vincent wrote:

> Hi,
>
> Not quite right there ... You can preceed a command with an 
> assignment, and the assigned variable is then put into the environment 
> of the command that is run. Thus the command
> "echo" is run with an environment variable AAAA with the value aaaa. 
> However, this does not change the AAAA shell variable (which is 
> currently empty) so the echo prints a blank (it's empty argument) and 
> ignores the AAAA in it's environment.
>
> This syntax is useful for setting environment variables for one 
> command invocation only. They are not saved.
>
> I hope this fully explains what is going on.

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.




--
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019