Welcome to the VanDyke Software Forums

Join the discussion today!


Go Back   VanDyke Software Forums > Scripting

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 05-12-2017, 09:08 AM
Raikoug Raikoug is offline
Registered User
 
Join Date: May 2017
Posts: 1
CDP neighbor to interface description

Hello,
I'm nearly new to scripting, and I can't understand how to achieve this:

retrive from sh cdp neighbor commands the info I want to make the description command I need

Well, i know what I should know, but I can't find it:
First I can't store line per line output in a variable to handle it.

Second I can't find a way to handle string in regex (just: simple as [1-9]//[1-48] match or "FixedHostnamePart-[0-9]-Stuff" )
The most I achieved is:
make a sh cdp neighbor to be stored in a hostname.txt file. Than with notepad++ and regex easily make the
  • int x/y
  • description hostname
for each cdp neighbor in the file.
I would like to achieve this with a single securecrt script to be able later to try to make it run on ALL the machine we handle (+80) in a single shot.

(I'm just wandering if no one ever needed this... )
Reply With Quote
  #2  
Old 05-12-2017, 09:36 AM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 3,997
Hi Raikoug,

I'm going to need a lot more info in order to assist.

First, what version of SecureCRT are you using?

On what platform/OS?

Please list the explicit steps regarding how you would accomplish this task manually.
__________________
Thanks,
--Brenda

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote
Reply

Tags
cisco , regex


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 08:06 PM.