From bcd74c50c4ba7e2cd85e8c47193797698675fba2 Mon Sep 17 00:00:00 2001 From: Dane Williams Date: Sun, 15 Mar 2020 14:30:40 -0700 Subject: [PATCH] tructus --- network.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/network.sh b/network.sh index 39349e2..4bd9d1c 100755 --- a/network.sh +++ b/network.sh @@ -7,8 +7,8 @@ get_ssid() { - if /System/Library/PrivateFrameworks/Apple80211.framework/Resources/airport -I | awk -F: '/ SSID/{print $2}' &>/dev/null - echo $(/System/Library/PrivateFrameworks/Apple80211.framework/Resources/airport -I | awk -F: '/ SSID/{print $2}') + if /System/Library/PrivateFrameworks/Apple80211.framework/Resources/airport -I | grep -E ' SSID' | cut -d ':' -f 2 &> /dev/null + echo $(/System/Library/PrivateFrameworks/Apple80211.framework/Resources/airport -I | grep -E ' SSID' | cut -d ':' -f 2) else echo 'Ethernet' fi