ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "" <>
Subject Quoting arguments for an exec
Date Fri, 16 Jan 2004 16:04:47 GMT

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 .

View raw message