mirror of
https://github.com/myvesta/vesta
synced 2025-08-14 02:28:05 -07:00
calculate only numbers
This commit is contained in:
parent
2fb43d192c
commit
2cdeb72867
1 changed files with 4 additions and 1 deletions
|
@ -45,9 +45,12 @@ bytes=0
|
|||
|
||||
# Parsing log
|
||||
while read line; do
|
||||
if [[ '-' != "$line" ]] && [[ 0 -lt "$line" ]]; then
|
||||
|
||||
if [[ "$line" =~ ^[0-9]+$ ]]; then
|
||||
line=${line#0}
|
||||
bytes=$(($bytes + $line))
|
||||
fi
|
||||
|
||||
done < $log_file
|
||||
|
||||
# Converting to Mb
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue