Merge pull request #127 from mklbravo/feature/network-bandwidth-format

Enhancement: Network Bandwidth display format
This commit is contained in:
Ethan Edwards 2021-10-09 18:49:13 -04:00 committed by GitHub
commit 6110aac167
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -18,8 +18,8 @@ main() {
total_download_bps=$(expr $final_download - $initial_download)
total_upload_bps=$(expr $final_upload - $initial_upload)
total_download_kbps=$(echo "scale=2; $total_download_bps / 1024" | bc)
total_upload_kbps=$(echo "scale=2; $total_upload_bps / 1024" | bc)
total_download_kbps=$(echo "$total_download_bps 1024" | awk '{printf "%.2f \n", $1/$2}')
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"
done