RE: How to schedule for a repeated task?
Please find below my simple expect telnet script :
>set name 172.16.17.160
>spawn telnet $name
>set cmd1 command1
>set cmd2 logout
When I try for this procedure , I just see loging in and loging out from the
telnet session . Actually , I need to have the output result of issuing
'command1' on the remote node to be captured on my local host . But when I
try manually , say telnet to it and issue the command , I see the output on
my screen . Please help me how to modify my simple code to have the desired
It doesn't require a username or password?
I'm guessing it's sending the first command "command1" too soon, before the
command prompt appears, so the other end doesn't see it. It only sees the
expect "% "
or whatever the command prompt is, such as "$ " or "# " before sending the