Skip to content

Commit

Permalink
fix for null values
Browse files Browse the repository at this point in the history
  • Loading branch information
serghey-rodin committed Apr 5, 2013
1 parent 2cdeb72 commit 23bed9e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bin/v-update-web-domain-traff
Expand Up @@ -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
Expand Down

0 comments on commit 23bed9e

Please sign in to comment.