VanDyke Software Forums

VanDyke Software Forums (
-   Scripting (
-   -   CDP neighbor to interface description (

Raikoug 05-12-2017 10:08 AM

CDP neighbor to interface description
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... )

bgagnon 05-12-2017 10:36 AM

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.

All times are GMT -6. The time now is 08:36 AM.