in reply to Regular expressions in shell prompts

"...connect to 900 routers using telnet and execute certain commands and capture the output..."

This seems to be some big monitoring task. You should consider to use Nagios or Icinga. See also Alerting On Critical State Changes.

Best regards, Karl

«The Crux of the Biscuit is the Apostrophe»

perl -MCrypt::CBC -E 'say Crypt::CBC->new(-key=>'kgb',-cipher=>"Blowfish")->decrypt_hex($ENV{KARL});'Help