You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Rhino <rh...@sympatico.ca> on 2004/10/18 23:52:36 UTC

Escape characters in Ant 1.6.1/Sshexec?

I need to execute an operating system command on a Linux box via the (optional) sshexec task in Ant 1.6.1. My command contains less-than and greater-than signs so Ant is objecting to that syntax. How can I escape those characters so that Ant/sshexec accepts my command?

This is my task:

<sshexec host="${server.hostname}" username="${tonge-userid}" password="${tonge-password}" trust="true" command="mysql -u ${mysql-userid} -p ${mysql-password} < Load_Dougs_Movies.sql > Load_Dougs_Movies.out"/>

It appears that the less-than before 'Load_Dougs_Movies.sql' and the greater-than after it are being taken as XML brackets. I feel sure there is some simple way to escape the less-than or greater-than but I don't know what that is.


Rhino
---
rhino1 AT sympatico DOT ca
"There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies." - C.A.R. Hoare