ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Boris Debic <de...@epiphany.com>
Subject RE: How to escape "
Date Thu, 03 May 2001 23:33:06 GMT
Ok, I tried it it doesn't help I need this exact line:

cscript ..\ConfigFiles\EpiMgr.vbs -P ""

But what I get is this, for the first example you gave,

     [exec] cscript '..\ConfigFiles\EpiMgr.vbs -P ""'
Execute:CommandLauncher: cscript '..\ConfigFiles\EpiMgr.vbs -P ""'

and this for the second.

     [exec] cscript ..\ConfigFiles\EpiMgr.vbs -P '""'
Execute:CommandLauncher: cscript ..\ConfigFiles\EpiMgr.vbs -P '""'

In both cases -P is wrong either ""' or '""'

Now, I have solved my immediate problem by changing the vbs script but my
concern is what happens
if in future projects I try to exec something where I don't have the source
code, and I can't construct the right parameters. I'll be forced to do it
indirectly through a bat file but that would be kind of un-elegant.

Best regards.

> -----Original Message-----
> From: N. J. O'Neill [mailto:njoneill@llnl.gov]
> Sent: Thursday, May 03, 2001 3:57 PM
> To: ant-user@jakarta.apache.org
> Subject: RE: How to escape "
> 
> 
> 
> OK, after a bit of testing and RTFM it looks like you might 
> want to use the 
> 'value' attribute instead of the 'line' attribute.  That is,
> 
>     <exec executable="cscript">
>        <arg value='..\ConfigFiles\EpiMgr.vbs -P ""'/>
>     </exec>
> 
> If this fails, you might want to try separating out the 
> arguments like this
> 
>     <exec executable="cscript">
>        <arg value='..\ConfigFiles\EpiMgr.vbs'/>
>        <arg value='-P'/>
>        <arg value='""'/>
>     </exec>
> 
> 
> 
> The problem you are encountering may just be a documentation 
> error.  Ant is 
> applying undocumented parsing rules to the 'line' attribute 
> that are not 
> consistent with its definition as "a space-delimited list of 
> command-line 
> arguments."  In particular, it is treating quotes as delimiters.
> 
> 
> --Neil
> 
> 
> 
> >No it doesn't work, I need -P "" but it comes out as -P
> >see below...
> >
> ><exec executable="cscript">
> >         <arg line='..\ConfigFiles\EpiMgr.vbs -P ""'/>
> ></exec>
> >
> >[exec] cscript ..\ConfigFiles\EpiMgr.vbs -P
> >Execute:CommandLauncher: cscript ..\ConfigFiles\EpiMgr.vbs -P
> >
> > > -----Original Message-----
> > > From: N. J. O'Neill [mailto:njoneill@llnl.gov]
> > > Sent: Thursday, May 03, 2001 11:24 AM
> > > To: ant-user@jakarta.apache.org
> > > Subject: Re: How to escape "
> > >
> > >
> > >
> > > >Use:
> > > >
> > > ><arg line="-h -f &quot;something&quot; -m -l"/>
> > > >
> > > >Diane
> > >
> > >
> > > But for sanity's sake, how about:
> > >
> > >    <arg line='-h -f "something" -m -l'/>
> > >
> > >
> > > --Neil
> > >
> 

Mime
View raw message