Skip to content

Instantly share code, notes, and snippets.

@0az
Created March 12, 2020 00:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 0az/1477849d0e6c93398ae495e4160de547 to your computer and use it in GitHub Desktop.
Save 0az/1477849d0e6c93398ae495e4160de547 to your computer and use it in GitHub Desktop.
Print the current wireless network SSID to stdout
#! /bin/sh
airport_ssid() {
/System/Library/PrivateFrameworks/Apple80211.framework/Resources/airport -I \
| sed -nE 's/^[[:space:]]+[[:<:]]SSID:[[:space:]]+//p'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment