rendered paste bodyRXB=$(</sys/class/net/${IFACE}/statistics/rx_bytes)
TXB=$(</sys/class/net/${IFACE}/statistics/tx_bytes)
loop:
RXBN=$(</sys/class/net/eth0/statistics/rx_bytes)
TXBN=$(</sys/class/net/eth0/statistics/tx_bytes)
if [ $(($RXBN - $RXB)) -lt 1024 ]; then
RXR=$(printf "%4db/s" $(( (($RXBN - $RXB) % 1024) / ${SLEEP} )))
else
RXR=$(printf "%4dk/s" $(( ($RXBN - $RXB ) / 1024 / ${SLEEP} )))
fi
if [ $(($TXBN - $TXB)) -lt 1024 ]; then
TXR=$(printf "%4db/s" $(( (($TXBN - $TXB) % 1024) / ${SLEEP} )))
else
TXR=$(printf "%4dk/s" $(( ($TXBN - $TXB) / 1024 / ${SLEEP} )))
fi
RXB=$RXBN; TXB=$TXBN