3 # check for files older than day
5 find log -name '*active*' -ctime +1 | cut -d_ -f2 | while read sw ; do
6 #./dell-switch.pl $sw 'show spanning-tree active'
11 #git -C out grep STP | grep -v RSTP | grep 'spanning-tree active' | sed -e 's/_/ /g' | awk '{ print $2" .*"$6 }' > /tmp/st.1.patt
14 git -C out grep root '*active*'
18 git -C ../mikrotik-switch/out grep root-bridge-id | cut -d. -f 1,3 | sed 's/\./ /'
19 git -C out grep -A 4 'Root ID' '*active*' | grep Address | sed 's/_/ /g' | awk '{ print $2 " " $7 }'
20 ) | sort -k 2 | column -t
22 echo "# STP only (RSTP ignored)"
23 git -C out grep STP | grep -v RSTP | grep 'spanning-tree active' | tee /tmp/st.2.full | sed -e 's/_/ /g' | awk '{ print $6"\t"$2"[ \t$]" }' > /tmp/st.2.patt
24 grep -f /tmp/st.2.patt /dev/shm/neighbors.tab | column -t