提取IP并生成文件

touch `ifconfig |grep inet|awk -F "[: ]+" '{print $3}'|head -n1`

原文地址:https://www.cnblogs.com/ahuo/p/14880733.html