On Sunday 19 Apr 2009, Arun Khan wrote:
> Capture the line RX bytes and TX bytes into a table and sum it up at
> the end of the month for your totals. (write a shell script and
> include it in the shutdown/reboot process)
The following in _one_ line should get the ball rolling for the script
/sbin/ifconfig eth0 | egrep "RX bytes" | sed -e 's/[ ]\{2,
\}//g' -e 's/([0-9]\{1,\}\.[0-9]\{1,\} [KM]b)//g' >> <filename>
sidebar: for regular expression see this
<http://www.regular-expressions.info/reference.html>
HTH
--
Arun Khan
--
http://mm.glug-bom.org/mailman/listinfo/linuxers