shell 获取当前ip

HOST_IP=$(hostname --all-ip-addresses | awk '{print $1}')

原文地址:https://www.cnblogs.com/freefei/p/5344043.html