ip a
ip r
ip a show dev ens33
ip a | grep -oE '[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+'
ip a |awk '/^[0-9]+:/{print $2}'| awk 'BEGIN{FS=":"}{print $1}'| grep -v lo
# 只要第一个网卡
ip a |awk '/^[0-9]+:/{print $2}'| awk 'BEGIN{FS=":"}{print $1}'| grep -v lo | head -1
ip a show dev $(ip a |awk '/^[0-9]+:/{print $2}'|awk 'BEGIN{FS=":"}{print $1}'| grep -v lo | head -1)
## 获取ens网卡 的ip
ip a show dev ens33 | awk 'NR==3{print $2}' | awk -F'/' '{print $1}'
ip a show dev $(ip a |awk '/^[0-9]+:/{print $2}'|awk 'BEGIN{FS=":"}{print $1}'| grep -v lo | head -1) | awk 'NR==3{print $2}' | awk -F'/' '{print $1}'
wangka=$(ip a |awk '/^[0-9]+:/{print $2}'| awk 'BEGIN{FS=":"}{print $1}'| grep -v lo)
for i in $wangka
do
ip a show dev $i | awk 'NR==3{print $2}' | awk -F'/' '{print $1}'
done
完结撒花
凤凰羽化之后是要腾空的, 是要翱翔九万里的。