Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , 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 From: Danilo Turina Subject: Re: bash: simple command problem Date: Fri, 25 Jun 2004 11:40:23 +0200 Lines: 43 Message-ID: <40DBF307.9090204@alcatel.it> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet AT sea DOT gmane DOT 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: 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 DOT 20 DOT job AT spamgourmet DOT 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/