Taken from https://stackoverflow.com/questions/21336126/linux-bash-script-to-extract-ip-address
ip route get 8.8.8.8 | awk -F"src " 'NR==1{split($2,a," ");print a[1]}'
Author: Lucas Vieites ✦ Published: ✦ Updated: ✦
Taken from https://stackoverflow.com/questions/21336126/linux-bash-script-to-extract-ip-address
ip route get 8.8.8.8 | awk -F"src " 'NR==1{split($2,a," ");print a[1]}'
Author: Lucas Vieites ✦ Published: ✦ Updated: ✦