Skip to content

Commit c422917

Browse files
committed
network-traffic: fix shellcheck issues
1 parent ce3ea6f commit c422917

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

polybar-scripts/network-traffic/network-traffic.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@ while true; do
4444
bytes[now_rx_$interface]="$(cat /sys/class/net/"$interface"/statistics/rx_bytes)"
4545
bytes[now_tx_$interface]="$(cat /sys/class/net/"$interface"/statistics/tx_bytes)"
4646

47-
bytes_down=$((((${bytes[now_rx_$interface]} - ${bytes[past_rx_$interface]})) / INTERVAL))
48-
bytes_up=$((((${bytes[now_tx_$interface]} - ${bytes[past_tx_$interface]})) / INTERVAL))
47+
bytes_down=$(((${bytes[now_rx_$interface]} - ${bytes[past_rx_$interface]}) / INTERVAL))
48+
bytes_up=$(((${bytes[now_tx_$interface]} - ${bytes[past_tx_$interface]}) / INTERVAL))
4949

50-
down=$(((( "$down" + "$bytes_down" ))))
51-
up=$(((( "$up" + "$bytes_up" ))))
50+
down=$(( "$down" + "$bytes_down" ))
51+
up=$(( "$up" + "$bytes_up" ))
5252

5353
bytes[past_rx_$interface]=${bytes[now_rx_$interface]}
5454
bytes[past_tx_$interface]=${bytes[now_tx_$interface]}

0 commit comments

Comments
 (0)