Last active
August 29, 2015 14:27
-
-
Save scottgwald/0a98f4d04e7f94ccbf83 to your computer and use it in GitHub Desktop.
get ip address on local 192 network (cross-platform is TODO, mac os x for now)
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
#! /bin/bash | |
ipline=$(ifconfig | grep inet | grep " 192") | |
ip=$(echo $ipline | sed 's/inet \([^ ]*\).*/\1/g') | |
echo $ip | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment