telnet in script.

From: Loris Serena (Loris.Serena@esat.com)
Date: Fri Jul 30 2004 - 10:57:42 EDT


Sunmanagers,

I'm trying to put together a little script to test TCP connectivity to a
remote host on a specific port.

>From the command line, that would be something like:
$ telnet 10.11.12.13 4567
Trying 10.11.12.13...
Connected to 10.11.12.13.
Escape character is '^]'.
^]
telnet> quit
Connection to 10.11.12.13 closed.
$ echo $?
0
$

But how do I put this into a script?

Thanks in advance

Loris

Esat Telecommunications Limited
is a wholly owned subsidiary of BT Group plc
Registered in Ireland, Registration No. 141524
Grand Canal Plaza, Upper Grand Canal Street, Dublin, Ireland

This electronic message contains information (and may contain files) from
Esat Telecommunications Limited which may be privileged or confidential. The
information is intended to be for the sole use of the individual(s) or
entity named above. If you are not the intended recipient be aware that any
disclosure, copying, distribution or use of the contents of this information
and or files is prohibited. If you have received this electronic message in
error, please notify us by telephone or email (to the numbers or address
above) immediately. http://www.esatbt.com
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:29:11 EDT