Created
November 29, 2016 20:43
-
-
Save david-sanabria/44ae55b2582ecf98cecdf3301f82f5df to your computer and use it in GitHub Desktop.
How to: Get Currently Connected SSID from the command line
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# get-ssid.sh | |
# To use these commands, identify the snippet that applies to your OS. | |
# This script currently does not check the OS version, so if you run this command you will | |
# get unexpected results. | |
# | |
## | |
## MacOS 10.10+ | |
## | |
/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport \ | |
-I | awk '/ SSID/ {print substr($0, index($0, $2))}' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment