ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Reilly <peter.rei...@corvil.com>
Subject Re: Quoting arguments for an exec
Date Fri, 16 Jan 2004 16:09:18 GMT
Just try to use a single " as follows:
<exec executable="echo">
    <arg value="&quot;test value&quot;"/>
</exec>

from the command line the ' in your example will be dropped
by the shell before reaching the cleartool.

Peter
sean.egan@cm-logic.com wrote:

>Hi,
>
>I'm trying to run a ClearCase command (cleartool mkattr), and I'm
>using the Commandline class to build the arguments.
>There is one argument that needs to have both single and double quotes
>around it to make sure it's passed to cleartool properly.
>
>On Unix: cleartool mkattr TestAttr '"test value"'  foo.c
>
>This problem only exists for Unix platforms as a Windows shell will
>allow me to escape argument.
>
>On Win32: cleartool mkattr TestAttr \"test value\"  foo.c
>
>The Commandline class checks for the use of single and double quotes
>in the same argument and throws an exception when found.
>Thus my command fails on Unix :-(
>
>Does anyone have a suggestion for me to get around this?
>
>Thanks, Sean.
>
>
>--------------------------------------------------------------------
>mail2web - Check your email from the web at
>http://mail2web.com/ .
>
>
>  
>
>------------------------------------------------------------------------
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
>For additional commands, e-mail: dev-help@ant.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message