[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [hobbit] Need for a report



Cleaned up the formatting and changed from grep -h red to grep -l "^red"

--
#!/bin/sh
BBVAR="/bb/bbvar"

TOTAL=`ls $BBVAR/logs/*.conn | wc -l`
red=`grep -l "^red" $BBVAR/logs/*.conn | wc -l` 
yellow=`grep -l "^yellow" $BBVAR/logs/*.conn | wc -l` 
clear=`grep -l "^clear" $BBVAR/logs/*.conn | wc -l` 
blue=`grep -l "^blue" $BBVAR/logs/*.conn | wc -l` 
purple=`grep -l "^purple" $BBVAR/logs/*.conn | wc -l`

echo "Total Connectivity: $TOTAL
Red Conn: $red
Yellow Conn: $yellow
Clear Conn: $clear
Disabled Conn: $blue
Purple Conn: $purple"
-----