show tech on 2948 switch fails
Brought to you by:
jkeroes
The output from a "show tech" command on a Cisco
2948-24 switch contains the string "%CPU" at the
beginning of a line. This causes the cmd() function to
fail because it thinks an invalid command was typed in.
I modified Cisco.pm on my system to verify the bug.
Here is the change I made:
Replace
if ( ( substr $out[$i], 0, 1 ) eq '%' ) {
with
if ( (( substr $out[$i], 0, 1 ) eq '%') && (( substr $out
[$i], 0, 4) ne '%CPU') ) {
in sub cmd {} in Cisco.pm
My version of Cisco.pm is 1.10.