Esteemed Contributor Esteemed Contributor
Re: script for telnet
Hi,

The best way is use EXPECT , but if you want simplest way try this:

----------
#!/bin/sh
(sleep 5
echo username
sleep 5
echo password
sleep 5
echo ls
sleep 5
echo exit) |telnet hostname
------------------

HTH
enjoy any little thing in my life