Welcome to the VanDyke Software Forums

Join the discussion today!


Go Back   VanDyke Software Forums > Scripting

Notices

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 07-15-2015, 01:23 AM
e2script e2script is offline
Registered User
 
Join Date: Sep 2014
Posts: 34
Wait for string then copy string

Hi,

I wonder what's the easiest way of creating a script that does the following:

1. Script runs a command that I specify in the script.
2. Host returns a string that looks like this: <number>:<number> <word that varies in number of digits> VL_<four digit number>_xxxxxxxx <letter> <letter> <number> <word>
3. Script understands that what we're looking for is the 4 digit number marked in bold above.
4. Script runs a new command that I specify based on that number. ex. sh vlan id <four digit number>

The word VL_ will always be put in front of the 4 digit number.

What's the best way to make a script like this?

Best regards,
e2script
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 04:57 AM.