Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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
From user Duane Richards: This also works in ZOC version 7.06.1. – fixer1234 Feb 22 at 20:21

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.