[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: shell script
On Thu, Apr 08, 1999 at 02:37:20PM +0300, Mike wrote:
> Hi all
> Does anyone know how to connect to a remote host by telnet using a shell
> script ?
> I need to get some data using a telnet.
Everybody's gonna laugh, but here's a quick'n'dirty way:
% cat>data-file
mylogin
mysecretpassword
acommand
anothercommand
yetanothercommand
etc
exit
^D
% perl -pe 'sleep 2' < data-file | telnet host
:-)
--
believing is seeing
gaal@forum2.org
http://www.forum2.org/gaal/