Welcome to the VanDyke Software Forums

Join the discussion today!

Go Back   VanDyke Software Forums > Scripting


Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
Old 12-08-2015, 06:33 AM
umbongo umbongo is offline
Registered User
Join Date: Oct 2015
Posts: 13
WaitForStrings matching on partial match

I have a script that is meant to run across multiple router OSes. However I am experiencing an issue where the WaitforStrings isn't behaving as expected.

It is currently set to wait for the following:
vPossiblePrompts = Array(_
Router + "#",_
Router + "-re0>",_
Router + "-re1>",_
Router + "> (enable)")
where 'Router' is the hostname. This hostname usually includes the model number of the device. When trying to match prompts on CatOS I am finding that the prompts are matching the following line:

Hardware Version: 3.0 Model: WS-C6509 Serial #: XXXXXXX

What I think is happening is the router name in this instance is formatted similar to "location-func01-6509" and for some reason only the last portion of the router name after the last dash is being matched and is somehow succeeding the WaitForStrings command. FYI, when troubleshooting (with synchronous on) the output stops before the serial number is displayed, which further raises my suspicions.

Could this be the problem or do I need to investigate further?

Version 7.2.3 (x64 build 500)
Reply With Quote


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -6. The time now is 10:32 PM.