This is the mail archive of the cygwin@sources.redhat.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]