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
  #1  
Old 05-15-2019, 04:24 AM
Zander Zander is offline
Registered User
 
Join Date: Oct 2016
Posts: 11
Extracting Multiple Strings from Output / Text File

Hi all,

I'm currently writing a script that runs a command on a remote host and needs to pull out every occurrence of a certain string. I see two ways of doing this: #1 - All within the script or #2 - Exporting an output to a text file and then grepping (or the VBScript equivalent) for the lines that contain the string I'm looking for

So I'm running the equivalent of a
Code:
show run
and need to pull out every line that contains
Code:
ip route-static
as a single or, if it's easier, separate variables. Is this possible? I've had a long Google session and haven't been able to spot anything similar out there!

Thanks in advance,
Zander
Reply With Quote
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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 01:23 AM.