delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/09/15/11:52:58

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/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
Date: Thu, 15 Sep 2005 11:52:15 -0400 (EDT)
From: Igor Pechtchanski <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: Yann Dubost <yann DOT dubost AT capgemini DOT com>
cc: cygwin AT cygwin DOT com
Subject: Re: eval function not working anymore !?
In-Reply-To: <!~!UENERkVCMDkAAQACAAAAAAAAAAAAAAAAABgAAAAAAAAAvR8gneCK0kO9UcxsgkJpU8KAAAAQAAAAZwPHXdi2eU6dH2nQVubb7QEAAAAA@capgemini.fr>
Message-ID: <Pine.GSO.4.63.0509151148570.12900@slinky.cs.nyu.edu>
References: <!~!UENERkVCMDkAAQACAAAAAAAAAAAAAAAAABgAAAAAAAAAvR8gneCK0kO9UcxsgkJpU8KAAAAQAAAAZwPHXdi2eU6dH2nQVubb7QEAAAAA AT capgemini DOT fr>
MIME-Version: 1.0

On Thu, 15 Sep 2005, Yann Dubost wrote:

> Hello,
>
>  I have been using cygwin for several years now and I have several scripts
> tant do not work anymore since I installed the latest release of cygwin
> (doxnloaded last week).
> The reason is the eval function that I use quite a lot in such ways as :
>
> DOMAINE_LISTE="DOM1 DOM2 DOM3"
> DOM1_MODULES='D1_M1 D1_M2"
> DOM2_MODULES="D2_M1 D2_M2"
>
> for domain in $DOMAINE_LISTE
> do
>    eval MODULES=$"${domain}_MODULES"
>    ...
> done
>
> Before it was working fine, but now echo $MODULES returns "DOM1_MODULES" or
> "DOM2_MODULES" instead of "D1_M1 D1_M2" "D2_M1 D2_M2"
>
> Have you experience such a change ?
> Do you have an idea why ?
> How can I work around this problem (another function to use ?)

This is most likely due to the switch of /bin/sh from ash to bash.  But
you could fix this with something more portable, like

   eval "MODULES=\$${domain}_MODULES"

HTH,
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha AT cs DOT nyu DOT edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor AT watson DOT ibm DOT com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

If there's any real truth it's that the entire multidimensional infinity
of the Universe is almost certainly being run by a bunch of maniacs. /DA

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

- Raw text -


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