Use %d for numbers instead of %s for string (#666)

This commit is contained in:
rickyjon 2020-05-31 10:34:40 +10:00 committed by GitHub
parent e9b0b5613b
commit 5dbff59882
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -16,6 +16,6 @@ read -r rxprev txprev < "$logfile"
rxcurrent="$(($(paste -d '+' /sys/class/net/[ew]*/statistics/rx_bytes)))"
txcurrent="$(($(paste -d '+' /sys/class/net/[ew]*/statistics/tx_bytes)))"
printf "🔻%sKiB 🔺%sKiB\\n" "$(((rxcurrent-rxprev)/1024))" "$(((txcurrent-txprev)/1024))"
printf "🔻%dKiB 🔺%dKiB\\n" "$(((rxcurrent-rxprev)/1024))" "$(((txcurrent-txprev)/1024))"
echo "$rxcurrent $txcurrent" > "$logfile"