运维网's Archiver
论坛
›
Shell/Powershell
› Shell脚本 自动检测网卡与对应IP-Fonphxion
张颢镡
发表于 2018-8-26 10:23:55
Shell脚本 自动检测网卡与对应IP-Fonphxion
#!/bin/bash #自动检查网卡与IP
for i in `seq 1 5`
do
b=`ifconfig |grep "eth"|awk '{print $1}'|sed -n $i\p && ifconfig |grep -A1 "eth"|grep inet| awk '{print $2}'|sed -n $i\p`
echo "$b"
done
页:
[1]
查看完整版本:
Shell脚本 自动检测网卡与对应IP-Fonphxion