#IPv4: #5类:ABCDE #A:1-127 #B:128-191 #C:192-223 ifconfig|egrep'\<([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\>\.\ <([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\>\.\<([0-9]|[1-9][0-9] |1[0-9][0-9]|2[0-4][0-9]|25[0-5])\>\.\<([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4 ][0-9]|25[0-5])\>' #使用的时候注意要把换行去掉原文链接:https://www.f2er.com/bash/389665.html