ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antoine Levy-Lambert <anto...@gmx.de>
Subject Re: ant exec task: ssh username contains spaces, how to escape?
Date Tue, 01 Feb 2011 22:04:39 GMT
Hi,

in theory, this should work :

<exec executable="ssh" failonerror="true">
    <arg value="stein inge morisbak@localhost" />
    <arg value="if [ -f /tmp/test.txt ]; then rm -f /tmp/test.txt ; fi" />
</exec>

when you use <arg value="'/> it generates a single argument.

BTW there is also a sshexec task in ant. Maybe it would work better ?

Regards,

Antoine

On 2/1/2011 3:24 PM, Stein Inge Morisbak wrote:
> I am trying to call ssh using the ant exec task from maven. My problem is that I can't
figure out how to escape spaces in usernames. I have tried:
>


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


Mime
View raw message