u
This commit is contained in:
6
myip.sh
6
myip.sh
@@ -1,4 +1,8 @@
|
||||
echo Local IP: $(echo `hostname -I` | awk '{print $1;}')
|
||||
if [ "$(uname)" = "Darwin" ]; then
|
||||
echo Local IP: $(ifconfig en0 | grep "inet " | awk '{print $2}')
|
||||
else
|
||||
echo Local IP: $(echo `hostname -I` | awk '{print $1;}')
|
||||
fi
|
||||
|
||||
echo Public IP: `curl -s ifconfig.me`
|
||||
echo
|
||||
|
||||
Reference in New Issue
Block a user