Shows leading 0. on network bandwidth values
This commit is contained in:
parent
afd4d17996
commit
4eaa335c7c
1 changed files with 2 additions and 2 deletions
|
@ -18,8 +18,8 @@ main() {
|
||||||
total_download_bps=$(expr $final_download - $initial_download)
|
total_download_bps=$(expr $final_download - $initial_download)
|
||||||
total_upload_bps=$(expr $final_upload - $initial_upload)
|
total_upload_bps=$(expr $final_upload - $initial_upload)
|
||||||
|
|
||||||
total_download_kbps=$(echo "scale=2; $total_download_bps / 1024" | bc)
|
total_download_kbps=$(echo "$total_download_bps 1024" | awk '{printf "%.2f \n", $1/$2}')
|
||||||
total_upload_kbps=$(echo "scale=2; $total_upload_bps / 1024" | bc)
|
total_upload_kbps=$(echo "$total_upload_bps 1024" | awk '{printf "%.2f \n", $1/$2}')
|
||||||
|
|
||||||
echo "↓ $total_download_kbps kB/s • ↑ $total_upload_kbps kB/s"
|
echo "↓ $total_download_kbps kB/s • ↑ $total_upload_kbps kB/s"
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in a new issue