local_ip(){ local OUTIF=`/sbin/route -n | tail -1 | sed -e 's/.* \([^ ]*$\)/\1/'` local IP="`/sbin/ifconfig | grep -A1 ${OUTIF} | grep inet | awk '{print $2}' | sed 's/addr://g'`" }