Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'awk'd version' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
awk'd version
Authored by: sjk on Feb 23, '06 08:14:05PM
Here's a more compact version that uses awk:

airport -I | awk '/ SSID/ {print $2}'

[ Reply to This | # ]
awk'd version
Authored by: LakeSolon on Mar 13, '09 01:09:10PM
Tweaked the above so it would print the entire SSID even if it includes spaces -

/System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resources/airport -I | awk '/ SSID/ {split($0, parts, ": "); print parts[2]}'

[ Reply to This | # ]