in reply to Regular expressions in shell prompts

I strongly echo the admonition to use a network monitor such as (specifically) Nagios. This subsystem will let you approach this requirement in-reverse – specify the physical device and execute a particular command on it – and it can easily do the same thing periodically. It also gives you an effective alternative to the "wad of network traffic" that querying 900 routers in a loop would do ... and an alternative for "what to do when the program dies, of course, on the 899th iteration."
  • Comment on Re: Regular expressions in shell prompts