Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Does anymone show me a script sample using the software "ZOC Terminal" (version 6.2) to perform an simple automatic action on a router, let's say a reboot or change of daylight savings time or something like that.

share|improve this question

2 Answers 2

up vote 1 down vote accepted

REXX script:

/* REXX: reboot.zrx */
connectip= ""
connectname= "ROUTERNAME"
connectpassword= "telnetpassword"
enablepassword= "enablepass"
CALL rebootrouter

CALL ZocConnect connectip
CALL ZocWait "Password:"
CALL ZocSend connectpassword||"^M"
CALL ZocWait ">"
CALL ZocSend "enable^M"
CALL ZocWait "Password:"
CALL ZocSend enablepassword||"^M"
CALL ZocWait "#"
CALL ZocSend "reload"
CALL ZocWait "]"
CALL ZocSend "y^M"
CALL ZocWait "]"
CALL ZocSend "y^M"

(Shamelessly stol.. umm borrowed from here and posted with a few beautifications)

share|improve this answer

While this sounds like a question for ServerFault, I've used Expect to do things like this in the past.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.