From 26cf4fc69d267e094df8bea957722a7c2f6475ef Mon Sep 17 00:00:00 2001 From: Dustin Kirkland Date: Tue, 16 Jun 2009 16:46:32 -0500 Subject: [PATCH] must compute unit inside of loop Signed-off-by: Dustin Kirkland --- bin/network | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/network b/bin/network index baf9a95d..acfc3611 100755 --- a/bin/network +++ b/bin/network @@ -31,12 +31,12 @@ if [ "$1" = "--detail" ]; then exit 0 fi -unit="kB/s" t2=`date +%s` ifconfig=`/sbin/ifconfig "$interface" | grep "RX bytes" | sed "s/.*:\(.*\) (.*:\(.*\) (.*/\1\n\2/"` for i in up down; do cache="/var/run/screen/S-$USER/$PKG.network_$i" t1=`stat -c %Y "$cache"` 2>/dev/null || t1=0 + unit="kB/s" if [ $t2 -le $t1 ]; then rate=0 else