Skip to content

Instantly share code, notes, and snippets.

@kigster
Created April 22, 2016 20:28
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 kigster/8f15164b1e65a245fbef50388930a604 to your computer and use it in GitHub Desktop.
Save kigster/8f15164b1e65a245fbef50388930a604 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
[[ ! -x /usr/local/bin/airport ]] && \
sudo ln -s /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport /usr/local/bin/airport
[[ ! -x /usr/local/bin/watch ]] \
&& cd /usr/local/bin && sudo curl -O http://ktwit.net/code/watch-0.2-macosx/watch && sudo chmod 755 watch
watch_wifi() {
watch "airport -s | awk 'BEGIN{FS=\" -\"}{printf(\"%10d%s\n\", -\$2, \$0)}' | sort -nr"
}
echo "Setup successful. Now type 'watch_wifi' to start monitoring."
echo "When finished, press Ctrl-C"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment