> If issuing the commands manually produces the desired output, you
> could try autoexpect¹ and edit the output of running an autoexpect
> session to your liking. There is a manual page too².
>
> Thank you very much for your help . This is very near to what I really want
to do . I tried as the followings :
#autoexpect -c

#telnet 172.16.17.160
->command1
->logout
#exit
It has produced an script named 'script.exp' . When I run this script , I
see automatic telnet to the VxWorks remote node and then issuing the desired
command but to exit I need to press Ctrl-C . Then I tried to automate it
like the following :

#for i in 1 2 3 4 5
>do
>./script.exp
>sleep 10
>done
It is quite ok , except for the need that I must press Ctrl-C at the end of
every run . Can you please let me know how to remove that un-necessary
hitting of Ctrl-C ?

Reply via email to