Hi !
I am trying to make an automated telnet script. The expect command is there
running on  my machine, but still I am not able to run it properly. I have tried
two codes

LoginName is : linus
Password : ChangeMe
Hostname : aald02
Code is as follows ->

{
     expect "login:"
     send "linus"             # this says the "send" command not found....I
don't know why ? TCL is installed on my comp.
     expect "Password:"
     send  "ChangeMe"
     sleep 200
     ls
}  |  telnet aald02

 and this code too

{
     expect "login:"
     echo "linus"
     expect "Password:"  # This code gives the information on the term, as shown
 below with "=>"
     echo "ChangeMe"     # into the machine but comes out with the following
code => Trying Ip Address.......
     ls             #                                         => Connected to
the IP address
                    #                                         => Escape
character is ^]
                    #                                         => Conncection
closed by the foregin host
}  |  telnet aald02      #

I would be grateful, if someone suggests an alternative.
Thanks in advance,
Rajat

Alcatel Australia,
Engineer,Dept# 48
Mandible St.
Ph. +61.2.96990044 Extn. 3058




-- 
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://slug.org.au/lists/listinfo/slug

Reply via email to