And for those that just want SSID, try either of these
ipconfig getsummary en0 | grep -e '[^B]SSID' | cut -d " " -f5 ipconfig getsummary en0 | grep -e '[^B]SSID' | sed -E 's/^.*: (.*)/\1/g'
And for those that just want SSID, try either of these
Second will be better if your SSID has a space in it for some reason. You'll also be able to grab the domain name if you want it for similar reasons.