From 23bed9ed1917f14dc44c904179ed765b84bb8765 Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Fri, 5 Apr 2013 08:32:08 +0300 Subject: [PATCH] fix for null values --- bin/v-update-web-domain-traff | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/v-update-web-domain-traff b/bin/v-update-web-domain-traff index 506b4edef..5bfb6d387 100755 --- a/bin/v-update-web-domain-traff +++ b/bin/v-update-web-domain-traff @@ -45,12 +45,12 @@ bytes=0 # Parsing log while read line; do - if [[ "$line" =~ ^[0-9]+$ ]]; then line=${line#0} - bytes=$(($bytes + $line)) + if [ ! -z "$line" ]; then + bytes=$(($bytes + $line)) + fi fi - done < $log_file # Converting to Mb