I have very little experience with AWK, but it seems like the best tool for my purpose now.
I am trying to get a list of nearby BSSIDs by using the airport -s command in OS X. Output looks like this:
SSID BSSID RSSI CHANNEL HT CC SECURITY (auth/unicast/group)
MyWireless 00:11:22:33:44:55 -85 64 N US WPA(PSK/TKIP/TKIP) WPA2(PSK/TKIP/TKIP)
Your Wireless 66:77:88:99:00:11 -84 64 N US WPA(PSK/TKIP/TKIP) WPA2(PSK/AES/TKIP)
So clearly I'm looking for the second column. So I tried:
airport -s | awk '{print $2}'
And that works fine until I have an SSID with a space in its name. I've tried setting IFS to tab, FS to tab, nothing really seems to work.
I keep getting this:
00:11:22:33:44:55
Your
I am hoping eventually to get a simple list:
00:11:22:33:44:55
66:77:88:99:00:11
I know this is a one-line solution, so I'm really embarrassed that I even have to ask... Please be kind. :)