This commit is contained in:
Dane Williams 2020-03-15 14:30:40 -07:00
parent 91c9952bd4
commit bcd74c50c4

View file

@ -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