2
我試圖從arp表中提取MAC地址,但沒有返回空行。使用grep正則表達式從arp表中提取MAC地址
我試圖使用命令:
arp -a | grep eth1 | grep '^\A(([0-9a-fA-F]{2}):){5}([0-9a-fA-F]{2})$\z'
的 'ARP -a' 命令返回:
? (192.168.36.20) at 80:e0:1d:43:b0:60 [ether] on eth1
? (192.168.0.1) at 34:4b:50:b7:ef:08 [ether] on usb0
? (172.17.140.200) at 10:c3:7b:c4:82:04 [ether] on eth0
由於使用