fix for null values

This commit is contained in:
Serghey Rodin 2013-04-05 08:32:08 +03:00
commit 23bed9ed19

View file

@ -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