You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Swati Gaikwad <sg...@versant.com> on 2008/01/23 11:13:35 UTC

Rexec task for bash command in ant script

Hello,

I am using the rexec task of ant. 
I could successfully run the commands (ls, cd, pwd, etc) to the remote
machine using rexec task of ant.
When I try to run the bash command, rexec hangs. 
	The rexec task I tried is as follows:
      <rexec userid="sgaikwad" password="swati" server="192.168.10.42"
command="bash"/>

Can I have a solution for this? Please let me know is it possible to run
bash using rexec task of ant to remote machine.


Thanks and Regards,
Swati

Re: Rexec task for bash command in ant script

Posted by Chuck Holzwarth <ch...@yahoo.com>.
bash is an interactive command interpreter. cd, pwd etc. are commands that allow input then do their jobs and exit. You can issue "bash <command_file>" to execute the commands in the command_file and exit, but bash on its own will start an interactive shell that then waits for input.

Swati Gaikwad <sg...@versant.com> wrote: Hello,

I am using the rexec task of ant. 
I could successfully run the commands (ls, cd, pwd, etc) to the remote
machine using rexec task of ant.
When I try to run the bash command, rexec hangs. 
 The rexec task I tried is as follows:
      
command="bash"/>

Can I have a solution for this? Please let me know is it possible to run
bash using rexec task of ant to remote machine.


Thanks and Regards,
Swati



Thank you,
Chuck Holzwarth
(804) 403-3478 (home)
(540) 335-3171 (cell)
       
---------------------------------
Never miss a thing.   Make Yahoo your homepage.