ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lopez, William" <william.lo...@eds.com>
Subject RE: How to grab Telnet's output
Date Tue, 26 Aug 2003 13:11:44 GMT
Roman:

I use the telnet task from a Win2K box to call a script on an AIX box...I
(Ant)capture the output in the log file

  <target name="create_ears_A3"
         depends="bkup_prodA3_rules,bkup_prodA3_props">
     <telnet userid="${id}" password="${pwd}" server="${prod2_A3}">
       ...
       <write>ls -la</write>
       <read string="..."/>
     </telnet>
  </target>

...called by bat file with the following...
ant -f telnet_A3A4.xml -l Misc_Logs\telnet.log -verbose 

...get the following output:
   ...
   [telnet] ls -la
   [telnet] > ls -la
   [telnet] total 219768
   [telnet] drwxr-xr-x   6 wasadmin wasadmin       4096 Jul 25 10:36 .
   [telnet] drwxr-xr-x  23 wasadmin wasadmin       4096 Apr 28 17:19 ..
   [telnet] -rw-r--r--   1 wasadmin wasadmin   15496937 Jul 21 08:31
Bill_Review_App_Server.ear
   [telnet] drwxr-xr-x   3 wasadmin wasadmin        256 Jul 25 10:38
ConfigurationManagement
   ...

I believe the ssh tasks is the way to go, telnet is quirky...which is why I
had to make scripts on the AIX box and call them via telnet, instead of
directly entering the commands in telnet task...it didn't always work.

-Will

-----Original Message-----
From: Roman Rytov [mailto:rrytov@entopia.com] 
Sent: Tuesday, August 26, 2003 3:24 AM
To: Ant Users List
Subject: How to grab Telnet's output



I need to figure out a remote dir's content. I decided to use Telnet. I
connect through Telnet session and call "ls -l" command. But is there a way
to catch the output?

Roman R

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

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


Mime
View raw message