Last active
August 29, 2015 14:02
-
-
Save insparrow/637d1f80f99e56e0f1f0 to your computer and use it in GitHub Desktop.
Sets bash variable which holds internal / exteral IP address according to the SSID you are connected to
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export SERVER=$(networksetup -getairportnetwork en0 | grep -q "HOME_SSID" && echo "INTERAL_IP" || echo "EXTERNAL_IP") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment