|
|
Automatically set location based on connected SSID
Instead of using system profiler, which can take a bit to run on some older Macs, I'd suggest using the following:
N.B. For any unfamilar with AppleScript, please remember to use that as a single line -- without the space and backslash characters on the first line -- inside the script.
awk'd version
Here's a more compact version that uses awk:
airport -I | awk '/ SSID/ {print $2}'
awk'd version
Tweaked the above so it would print the entire SSID even if it includes spaces -
sed version
Here's a more compact and faster version. sed is much smaller and faster than awk.
|
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysNo new commentsLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.05 seconds |
|