ifconfig|grep -oP '(?<=inet addr:)(?=(?!127\.0\.0\.1))\d+(\.\d+){3}' 转载于:https://www.cnblogs.com/vanwoos/p/9319130.html