#!/bin/bash clear # Get IP - Start ip=$(ipconfig getifaddr en0) nen=0 while [ -z $ip ]; do let nen=nen+1 eth="en$nen" #echo $eth ip=$(ipconfig getifaddr $(echo $eth)) done echo "Internal IP: " $ip # Get IP - Stop #Variables - stop #echo "External IP: " $(curl -s https://www.kittell.net/ip.php) echo "External IP: " $(curl -s http://api.ipaddress.today)
Last Updated on June 7, 2019