获取ip

hostname -i | awk '{print $NF}'
原文地址:https://www.cnblogs.com/effortsing/p/10351497.html