Write an automated Telnet script using ANT

xiaoxiao2021-03-06  37

You need to write a scheduled automatic telnet to a script that performs the relevant operation on a server, so I first check it out, I found that it is not more than two ways, a pipeline file under Linux (

Http://www.chinaunix.net/jh/24/201364.html), another one is used in Expect

http://expect.sourceforge.net/,

http://expect.nist.gov), is more complicated, and the first method is basically only available for Linux / UNIX systems, and the second method requires installation of Expect and TCL.

Since I don't want to make things so complicated, I didn't start writing this script in a quite long period of time (very depressed every day manually).

Today, I suddenly remembered Ant as a Telnet Task, probably looked down (

http://ant.apache.org/manual/optionaltasks/telnet.html), found this task is very enough, and Ant is a cross-platform, for a Java developer, using Ant is actually a very Convenient ...

For more information, please see the link:

Write an automated Telnet script using ANT

转载请注明原文地址:https://www.9cbs.com/read-60609.html

New Post(0)