8

Noticed a few of the scripts on here were not working too well for me on updating the SSID (with spaces etc...)

Also noticed that getting the external internet IP was not always updating correctly

## Wifi SSID
printf "s:  `/System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resources/airport -I | grep -i ssid | grep -iv BSSID | awk '{print $2, $3, $4, $5, $6}'`\n"
## Local IP:
printf "l:  `ifconfig en0 | grep inet | grep -v inet6 | awk '{print $2}'`\n"
## Internet IP:
printf "i:  `curl --silent ip.appspot.com` \n"

Comments

User Avatar
MacLinuxUser 1974 days ago
Thanks for the script. I'm not versed in scripting, which leads me to a question you or others on this site may be able to help me with. Depending on my signal strength I sometimes use a USB WIFI adapter, is there a way to modify this script to display the same information for this external WIFI adapter as with the internal airport?

Thank you for any help you can throw my way.
User Avatar
MacLinuxUser 1974 days ago
How can this script be modified to display a external usb wifi adparter? Thanks
User Avatar
bgibson72 1965 days ago
This is only a guess, as I don't have an external adapter to test, but I think you would want to modify the Local IP code to read 'ifconfig en1' or whatever number your adapter is when you go to the terminal and issue the ifconfig command. The rest of the code should still be the same. Hope that helps!
User Avatar
eigoud 1903 days ago
Thanks for this, I've used all three and they work perfectly.

Log in to comment or register here.