Created
June 30, 2015 20:36
-
-
Save dotysan/eeb1c2e6142060f87953 to your computer and use it in GitHub Desktop.
snippet to lean LACP members
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# also fill an array with port-channel members so we can exclude them | |
set LACP [list] | |
if {$showLACP =="" && $tcl_platform(machine) =="Switch"} { | |
foreach word [split [exec "show etherc summ | begin ^\[0-9]"]] { | |
if [string is integer -strict $word] { | |
set portchannel $word | |
} | |
if [regexp {(.*)\(P\)$} $word -> lacp] { | |
lappend LACP $lacp | |
} } } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment