This is the mail archive of the
cygwin@sources.redhat.com
mailing list for the Cygwin project.
Re: Fwd: RE: problems passing -DPARAM="String" from sh
- To: cygwin users <cygwin at sourceware dot cygnus dot com>
- Subject: Re: Fwd: RE: problems passing -DPARAM="String" from sh
- From: "Lassi A. Tuura" <lassi dot tuura at cern dot ch>
- Date: Thu, 17 Aug 2000 08:14:06 +0200
- Organization: Northeastern University, Boston, USA
- References: <20000816204705.18283.qmail@web120.yahoomail.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@sourceware.cygnus.com