#!/bin/sh

if [ ! -s /tmp/share.onl ] ; then
    echo "Information unavailable !!!"
    echo ""
else
    ONL=`cat /tmp/share.onl | awk '{print " " $1 $2}' | awk '{gsub (" 1", "ONLINE: "); gsub (" 0", "OFFLINE: "); print $0 }'`
    ILEALL=`echo "$ONL" | wc -l`
    ILEONL=`echo "$ONL" | grep ONLINE | wc -l`
    ILEOFF=`echo "$ONL" | grep OFFLINE | wc -l`
    echo "$ONL"
    echo ""
    echo "$ILEONL - PEER ONLINE"
    echo "$ILEOFF - PEER OFFLINE"
    echo ""      
fi

exit 0