From 8542c23978f941c8cf3d0acbef5afddff0b9f9e8 Mon Sep 17 00:00:00 2001 From: Steve Loughran Date: Wed, 26 Dec 2001 20:37:10 +0000 Subject: [PATCH] add detail on the nested elements; wrapping a few lines in the process. git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@270381 13f79535-47bb-0310-9956-ffa450edef68 --- docs/manual/OptionalTasks/telnet.html | 41 +++++++++++++++++++++++---- 1 file changed, 35 insertions(+), 6 deletions(-) diff --git a/docs/manual/OptionalTasks/telnet.html b/docs/manual/OptionalTasks/telnet.html index 3e419303c..eb6055e64 100644 --- a/docs/manual/OptionalTasks/telnet.html +++ b/docs/manual/OptionalTasks/telnet.html @@ -2,16 +2,19 @@ -Apache Ant User Manual +Telnet

Telnet

Description

-Task to automate a remote telnet session. The task uses nested <read> to indicate strings to wait for, and <write> tags to specify text to send. +Task to automate a remote telnet session. The task uses +nested <read> to indicate strings to wait for, and +<write> tags to specify text to send. -

If you do specify a userid and password, the system will assume a common unix prompt to wait on. This behavior can be easily over-ridden.

+

If you do specify a userid and password, the system will +assume a common unix prompt to wait on. This behavior can be easily over-ridden.

Parameters

@@ -22,12 +25,12 @@ Task to automate a remote telnet session. The task uses nested <read> to i - + - + @@ -50,8 +53,34 @@ Task to automate a remote telnet session. The task uses nested <read> to i
userid the login id to use on the telnet server.NoOnly if password is specified
password the login password to use on the telnet server.NoOnly if userid is specified
serverNo
+

Nested Elements

+The commands to send to the server, and responses to wait for, are +described as nested elements. + +

read

+ +

declare (as a text child of this element) a string to wait for. +The element supports the timeout attribute, which overrides any +timeout specified for the task as a whole. It also has a string +attribute, which is an alternative to specifying the string as +a text element. +

+Always declare an opening and closing +<read> element to ensure that statements are not sent before +the connection is ready, and that the connection is not broken before +the final command has completed. + +

write

+ +

describes the text to send to the server. The echo boolean +attribute controls whether the string is echoed to the local log; +this is "true" by default +

Examples

-A simple example of connecting to a server and running a command. This assumes a prompt of "ogin:" for the userid, and a prompt of "assword:" for the password. +A simple example of connecting to a server and running a command. This assumes + a prompt of "ogin:" for the userid, and a prompt of "assword:" + for the password. +
 <telnet userid="bob" password="badpass" server="localhost">
    <read>/home/bob</read>