Created
April 22, 2016 20:28
-
-
Save kigster/8f15164b1e65a245fbef50388930a604 to your computer and use it in GitHub Desktop.
This file contains 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
#!/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