0
How can I use bash to get the SSID name of the Wi-Fi network my Wi-Fi interface is associated to, when I know the Wi-Fi interface's IP address?
I get a list of IP addresses by using the ifconfig
command. I want to display the SSID name along with the IP address as the output. I did check commands like networksetup
, but found no way to do it. I can go the AppleScript way to get it, but would like to know if there is a way to do it in bash.
I did come across a command that helps me get the SSID name, but it doesn't print the IP address:
/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -I
I'm running OS X Yosemite (10.10.x)
I was able to get this to work using netstat and networksetup -getairportnetwork enX commands – smokinguns – 2014-12-05T01:44:20.130