I am trying to get the traffic details in a Linux box interface by running following:
/sbin/ifconfig eth0 |grep bytes|cut -d":" -f2|cut -d" " -f1
It's showing the result in bytes but i want the result in bits. I have tried with awk like this:
/sbin/ifconfig eth0 |grep bytes|cut -d":" -f2|cut -d" " -f1 | awk '{ SUM = $1*8; print SUM}'
but the result is showing like this: 1.488e+11
Can you please help me to modify the command; I need the result in full numbers, like: 18600143106.
Thank you.