delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/08/17/02:14:30

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
X-Authentication-Warning: smtp1.cern.ch: Host IDENT:root AT pb-d-137-138-206-44 DOT cern DOT ch [137.138.206.44] claimed to be skywalker
Message-ID: <399B82AE.38638072@cern.ch>
Date: Thu, 17 Aug 2000 08:14:06 +0200
From: "Lassi A. Tuura" <lassi DOT tuura AT cern DOT ch>
Organization: Northeastern University, Boston, USA
X-Mailer: Mozilla 4.7 [en] (X11; I; Linux 2.2.12-20 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: cygwin users <cygwin AT sourceware DOT cygnus DOT com>
Subject: Re: Fwd: RE: problems passing -DPARAM="String" from sh
References: <20000816204705 DOT 18283 DOT qmail AT web120 DOT yahoomail DOT com>

> #!/bin/sh
> SOURCE="-DPARAM=\"This String\" file.cpp"
> icl $SOURCE                              # This line doesn't work.
> icl -DPARAM="This String" file.cpp       # This line works fine.

Do this:
  #!/bin/sh
  SOURCE="-DPARAM='This String' file.cpp"
  eval "icl $SOURCE"

... or more generally:
  #!/bin/sh
  SOURCE="-DPARAM='This String' file.cpp"
  eval "set -- $SOURCE"
  for arg in "$@"; do
     # use $arg for something
     echo "arg: $f"
  done

Hope this helps,
//lat
-- 
If you have to ask what jazz is, you'll never know.
	--Louis Armstrong

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


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