Created
March 26, 2009 16:45
-
-
Save kdwinter/86196 to your computer and use it in GitHub Desktop.
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
| #!/bin/sh | |
| # wifiscan | |
| # Wireless interface | |
| iface='wlan0' | |
| # Extract info and format the output | |
| (echo ESSID~~~Channel~~~Quality~~~Encryption && \ | |
| echo "---~~~---~~~---~~~---" && \ | |
| iwlist $iface scan | \ | |
| sed -n -e 's/.*ESSID:\(.*\)/\1/p' \ | |
| -e 's/.*Channel:\([^ ]*\)/~~~\1/p' \ | |
| -e 's/Encryption key:\(.*\)/~~~\1/p' \ | |
| -e 's/.*Quality=\([^ ]*\)\/100.*/~~~\1/p' | \ | |
| xargs -n4 echo) | \ | |
| \ | |
| awk -F~~~ '{print $1 "~~~" $3 "~~~" $4 "~~~" $2}' | \ | |
| column -tx -s ~~~ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment