From 2b5906140fd92bb6a361024f189bbf1135d38bed Mon Sep 17 00:00:00 2001 From: Rodrigo Nascimento Date: Sun, 2 May 2021 19:29:23 -0300 Subject: [PATCH] Change from backticks to $() as command substitution --- scripts/network_bandwith.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/network_bandwith.sh b/scripts/network_bandwith.sh index 655c9f0..213ef26 100755 --- a/scripts/network_bandwith.sh +++ b/scripts/network_bandwith.sh @@ -7,16 +7,16 @@ network_name=$(tmux show-option -gqv "@dracula-network-bandwith") main() { while true do - initial_download=`cat /sys/class/net/$network_name/statistics/rx_bytes` - initial_upload=`cat /sys/class/net/$network_name/statistics/tx_bytes` + initial_download=$(cat /sys/class/net/$network_name/statistics/rx_bytes) + initial_upload=$(cat /sys/class/net/$network_name/statistics/tx_bytes) sleep $INTERVAL - final_download=`cat /sys/class/net/$network_name/statistics/rx_bytes` - final_upload=`cat /sys/class/net/$network_name/statistics/tx_bytes` + final_download=$(cat /sys/class/net/$network_name/statistics/rx_bytes) + final_upload=$(cat /sys/class/net/$network_name/statistics/tx_bytes) - total_download_bps=`expr $final_download - $initial_download` - total_upload_bps=`expr $final_upload - $initial_upload` + 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)