rc.netinfo 138 B

12
  1. ipaddr=$(ip addr show $(ip route show|awk '/default/ { print $5 }')|awk '/inet / { print $2 }'|tail -1)
  2. echo "Your ip address is $ipaddr"