Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
To: cygwin@cygwin.com
From: Danilo Turina <danilo.turina@alcatel.it>
Subject: Re: bash: simple command problem
Date: Fri, 25 Jun 2004 11:40:23 +0200
Lines: 43
Message-ID: <40DBF307.9090204@alcatel.it>
References: <AE9593E6D161544D82CEFCA0552EEAAE013DECFD@ebexbn01.dpeb.de>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: usenet@sea.gmane.org
X-Gmane-NNTP-Posting-Host: hydra01.alcanet.it
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040616
In-Reply-To: <AE9593E6D161544D82CEFCA0552EEAAE013DECFD@ebexbn01.dpeb.de>

This is not specifically related to Cygwin.

Anyway, your command does not work because the variables (variableA and 
nextVariable) are expanded by Bash before the line is executed (as always).

In fact, something like this would work:

variableA=valA nextVariable=next eval 'echo $variableA $nextVariable'

Ciao,

		Danilo

cygwin.20.job@spamgourmet.com wrote:

> Hi Folks
> 
> I hove the problem to set variable in front of executing a command. The
> bash manpage says that a simple command is a set of variable assignment
> followed by the command
> 
> So I think that
> 
> variableA=valA nextVariable=next echo $variableA $nextVariable
> should echo valA next but when I try this in the bash the echo is empty
> 
> Did I understand something wrong or is it a bug?
> 
> Regards 
> 
>     Franz
> 
> 


-- 
--------------------------------------
Danilo Turina
Alcatel Optics OND Network Management
Rieti (Italy) - Phone: +39 0746 600332
--------------------------------------

3 anni 2 mesi 16 giorni 2 ore 5 minuti 45 secondi


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

