Skip to content

Commit 9602561

Browse files
authored
Merge pull request #501 from mycraftmw/main
2 parents c36f6c3 + 79b0127 commit 9602561

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

segments/ifstat_sys.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ run_segment() {
1616
RXBN=$(netstat -i -b | grep -m 1 "$iface" | awk '{print $7}')
1717
TXBN=$(netstat -i -b | grep -m 1 "$iface" | awk '{print $10}')
1818
else
19-
iface=$(ip route show default | grep -o "dev.*" | cut -d ' ' -f 2)
19+
iface=$(ip route | grep "default" | grep -o "dev.*" | cut -d ' ' -f 2)
2020
if [ -z "$iface" ]; then
2121
iface=$(awk '{if($2>0 && NR > 2) print substr($1, 0, index($1, ":") - 1)}' /proc/net/dev | sed '/^lo$/d')
2222
fi

0 commit comments

Comments
 (0)