From c2bac01778ac97df043bcac1e169a68733009827 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Sat, 24 Dec 2022 04:20:47 +0100 Subject: [PATCH] use awk instead --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index cd823519..556b881d 100755 --- a/neofetch +++ b/neofetch @@ -3292,7 +3292,7 @@ get_network() { if [[ $ActiveNetworkName == "Wi-Fi" ]]; then LinkSpeed="$(/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -I | awk '/maxRate/{ print }' | xargs | cut -d " " -f2)Mbps" else - LinkSpeed="$(ifconfig $ActiveNetwork | grep 'media:' | gsed -E "s/.*\((.*)\).*/\1/gm")" + LinkSpeed="$(ifconfig $ActiveNetwork | awk '/media/{ print }' | gsed -E "s/.*\((.*)\).*/\1/gm")" fi network="$ActiveNetwork: $ActiveNetworkName@$LinkSpeed" ;;