Skip to content

Instantly share code, notes, and snippets.

Created Jun 30, 2015
What would you like to do?
snippet to lean LACP members
# 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