filter log/ filenames into sw.command
[dell-switch] / fans
1 (
2 echo "All fans breakdown by status:"
3 grep Fan log/*system* | cut -d: -f3 | sort | uniq -c
4 echo
5 echo "Failing fans:"
6 grep -B 15 'NOT' log/*system* | egrep '(NOT|Description|Type)' | grep -v -- '-Type: *Ethernet Switch' | sed -e 's/^[^_]*_//' -e 's/_[^-:]*[-:]/ /'
7 ) | tee /dev/shm/fans
8 git -C /dev/shm add fans
9 git -C /dev/shm commit -m fans