Name: Anonymous 2008-04-26 6:53
I need to find a way to shut down my Linux PC (Ubuntu 8.04 Server) after it has up & downloaded 100MB.
Anyone has any idea on how to do this?
Anyone has any idea on how to do this?
#!/bin/bash
RX=`ifconfig | grep -A 6 eth1 | grep "RX bytes" | sed -e "s/\s*RX bytes:\([0-9]*\).*/\1/g"`
TX=`ifconfig | grep -A 6 eth1 | grep "TX bytes" | sed -e "s/.*TX bytes:\([0-9]*\).*/\1/g"`
if [ $RX -ge 104857600 -o $TX -ge 104857600 ]
then
init 0
fi