in reply to Re: Cisco SNMP CDP Poll
in thread Cisco SNMP CDP Poll
Easiest way(I think) would be to change the bit of code that reads:
I am sure that there is a better way to do this(and one day I'll get off my but and add some text output as an option)
Or if you open a filehandle to write to inside the code change the format STDOUT to format FILEHANDLE and the write to write FILEHANDLE. That should work as well.
Then launch the script with cdppoll.pl ip > nameoftextfile#Prompt for SNMP community string print "community: "; chomp($community = <STDIN>); to $community=WHATEVERYOURCOMMUNITYSTRINGIS;
I am sure that there is a better way to do this(and one day I'll get off my but and add some text output as an option)
Or if you open a filehandle to write to inside the code change the format STDOUT to format FILEHANDLE and the write to write FILEHANDLE. That should work as well.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Cisco SNMP CDP Poll
by jcoxen (Deacon) on Jun 23, 2006 at 12:40 UTC |
In Section
Code Catacombs