ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pavel Shalashov <shalas...@nnov.tv>
Subject Re: How to grab Telnet's output
Date Tue, 26 Aug 2003 12:14:13 GMT
Hi Roman,

Tuesday, August 26, 2003, 12:24:10 PM, you wrote:


RR> I need to figure out a remote dir's content. I decided to use Telnet. I
RR> connect through Telnet session and call "ls -l" command. But is there a
RR> way to catch the output?
If you need to view the output on the console you have to issue the
<read> command. You can read the shell prompt (something like
"hostname-dir$ " or "$ "). Alternatively you can `echo` some string
after the `ls -l` and wait for it.

                   <write echo="false">ls -l;echo "COMMAND-COMPLETE"</write>
                   <read timeout="60">COMMAND-COMPLETE</read>

-- 
Best regards,
 Pavel



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


Mime
View raw message