Subject: Re: Fwd: RE: problems passing -DPARAM="String" from sh
From: "Lassi A. Tuura" <[email-masked]>
To: cygwin users <[email-masked]>
Date: Thu, 17 Aug 2000 08:14:06 +0200

> #!/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 [email-masked]