Cisco Support Community
Showing results for 
Search instead for 
Did you mean: 

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

show cdp neighbors | redirect

I am trying to use a copy and paste method of getting to all of my network devices to get a view of the network. I will then build a visio from that (don't get me started on all the tools for that specifically). I want to be able to login and then paste a single command and have it look something like:

show cdp neighbor | redirect tftp://"$hostname"-cdp-neighbor.txt

I tried this and it did not work so well. Below is the output from the logs on the tftp server.

Write request for file <"$hostname"-cdp-neighbor.txt>. Mode octet [05/02 11:28:30.790]

File <"$hostname"-cdp-neighbor.txt> : error 123 in system call CreateFile The filename, directory name, or volume label syntax is incorrect. [05/02 11:28:30.791]

Is there a way, outside of a tcl script, to get the hostname of the device to appear in the file name?

Everyone's tags (5)