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://10.8.32.7/"$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?