From ab9a46105e68ac9dc0e3e0d1905183bbd7e44a48 Mon Sep 17 00:00:00 2001 From: Dane Williams Date: Sun, 31 May 2020 16:33:38 -0700 Subject: [PATCH] fix extra space network mac --- scripts/network.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/network.sh b/scripts/network.sh index f95afda..145d142 100755 --- a/scripts/network.sh +++ b/scripts/network.sh @@ -16,8 +16,8 @@ get_ssid() ;; Darwin) - if /System/Library/PrivateFrameworks/Apple80211.framework/Resources/airport -I | grep -E ' SSID' | cut -d ':' -f 2 &> /dev/null; then - echo "$(/System/Library/PrivateFrameworks/Apple80211.framework/Resources/airport -I | grep -E ' SSID' | cut -d ':' -f 2)" + if /System/Library/PrivateFrameworks/Apple80211.framework/Resources/airport -I | grep -E ' SSID' | cut -d ':' -f 2 | sed 's/ ^*//g' &> /dev/null; then + echo "$(/System/Library/PrivateFrameworks/Apple80211.framework/Resources/airport -I | grep -E ' SSID' | cut -d ':' -f 2)" | sed 's/ ^*//g' else echo 'Ethernet' fi