Apr 29, 2021 • 更新于 May 16, 2025
$ ip addr | awk '/state UP/ {print $2}' | sed 's/.$//'
输出结果
eth0 eth1
按网段ping主机返回在线状态
将时间从纪元格式转换为ISO格式