From 42af610b66dbcf3607bfea21a5dde3cf5c39c4eb Mon Sep 17 00:00:00 2001 From: Dennis Paagman Date: Mon, 16 Oct 2023 21:44:27 +0200 Subject: [PATCH] Update network.sh to not cut off SSIDs starting with `^` --- scripts/network.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/network.sh b/scripts/network.sh index d2aa88b..27c5514 100755 --- a/scripts/network.sh +++ b/scripts/network.sh @@ -18,8 +18,8 @@ get_ssid() ;; Darwin) - 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' + if /System/Library/PrivateFrameworks/Apple80211.framework/Resources/airport -I | grep -E ' SSID' | cut -d ':' -f 2 | sed 's/^[[:blank:]]*//g' &> /dev/null; then + echo "$(/System/Library/PrivateFrameworks/Apple80211.framework/Resources/airport -I | grep -E ' SSID' | cut -d ':' -f 2)" | sed 's/^[[:blank:]]*//g' else echo 'Ethernet' fi