Fwd: RE: problems passing -DPARAM="String" from sh

Lassi A. Tuura lassi.tuura@cern.ch
Wed Aug 16 23:14:00 GMT 2000


> #!/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@sourceware.cygnus.com



More information about the Cygwin mailing list