[root@VS ~]#ifconfig ethx |awk -F '[ :]+' 'NR==2 {print $4}' 转载于:https://blog.51cto.com/leidongya/1532972