Get the IP adress of the interface where the default route is
ifconfig $( ip route | grep ^default | awk '{ print $NF }' ) | grep "inet " | awk '{ print $2 }'
Get the IP adress of the interface where the default route is
ifconfig $( ip route | grep ^default | awk '{ print $NF }' ) | grep "inet " | awk '{ print $2 }'