-
-
Save tatethurston/eba5c87486d3036bdc55d27d7d29c751 to your computer and use it in GitHub Desktop.
replacement for airport wifi scanning
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
system_profiler SPAirPortDataType | awk ' | |
BEGIN { printf "%-30s %-10s %-5s\n", "SSID", "Channel", "Signal" } | |
/Other Local Wi-Fi Networks:/ { start = 1; next } | |
/:/ { | |
if (start == 0 ) { next } | |
if (block == 0) { | |
ssid = $0 | |
gsub(":", "", ssid) | |
gsub(/^ +/, "", ssid) | |
gsub(/ /, "", ssid) | |
block = 1 | |
} | |
} | |
/Channel/ { channel = $2 } | |
/Signal/ { signal = $4 } | |
/Signal/ { | |
printf "%-30s %-10s %-5s\n", ssid, channel, signal | |
block = 0 | |
}' | sort -k3nr |
Author
tatethurston
commented
Dec 2, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment