On Monday 20 Apr 2009, Mukund Deshmukh wrote:
/sbin/ifconfig eth0 | egrep "RX bytes" | sed -e 's/[ ]{2, }//g' -e 's/([0-9]{1,}.[0-9]{1,} [KM]b)//g' >> <filename>
I feel people who can write regular expression are the most brilliant people on this earth :-))
The above is quite simple, some of the stuff that I seen from PERL geeks boggles my mind but testing our regular expressions before putting it into action/production is a must :D