OS X Hidden Airport Command

In OS X there is a useful wireless command line tool located at the nasty path of:


This command has a number of features, but the two most useful are the “-s” option and the “-I” option (that is a capital i).  The -s option will scan for available wireless networks and list them.
The -I option will list information about the wireless network that you are currently connected to.

If you are looking to script this command or use it in some sort of automation you will be interested in the -x option as well.  It is used with the other options and will output the same information, but in xml format rather then just printed to the terminal screen.  With the xml output you can more easily parse the output and use it in interesting ways in your scripts.

Sign up to our mailing list and receive our 5 Tools to Live By.
The tools mentioned in this guide are invaluable to managing a fleet of Apple computers.  There are more tools of course, but these are 5 must haves.  Once on the mailing list, we will be sending you the occasional email with tips on these tools, other useful tools, useful scripts, and so on.