Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Automatic Shutdown

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?

Name: Anonymous 2008-05-01 6:07

Ok, I currently have this:

#!/bin/bash
RX=`ifconfig eth0 | grep "RX bytes" | sed -e "s/\s*RX bytes:\([0-9]*\).*/\1/g"`
TX=`ifconfig eth0 | grep "TX bytes" | sed -e "s/.*TX bytes:\([0-9]*\).*/\1/g"`
echo $RX
echo $TX

When I try this:
Total=$RX+$TX
echo $Total

It gives me this error:
: command not found4: [Here is the $RX]

So I need to change the variable to an integer, can someone please tell me how to do this?

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List