我想知道一种方法来只显示我在任何正在运行的虚拟机上拥有的每个 NIC 的 MAC 地址:
到目前为止,我有这个:
ipcopv2
-----------------------------------------------
Groups: /Infraestructura
State: powered off (since 2018-03-16T13:30:56.389000000)
NIC 1: MAC: 080027D40320, Attachment: Bridged Interface 'eth1.15', Cable connected: on, Trace: off (file: none), Type: 82540EM, Reported speed: 0 Mbps, Boot priority: 0, Promisc Policy: deny, Bandwidth group: none
NIC 2: MAC: 080027660656, Attachment: Bridged Interface 'eth1', Cable connected: on, Trace: off (file: none), Type: 82540EM, Reported speed: 0 Mbps, Boot priority: 0, Promisc Policy: deny, Bandwidth group: none
NIC 3: MAC: 0800270D3D9E, Attachment: Bridged Interface 'eth0', Cable connected: on, Trace: off (file: none), Type: 82540EM, Reported speed: 0 Mbps, Boot priority: 0, Promisc Policy: deny, Bandwidth group: none
Capture screens: 0
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
我想要这个:
ipcopv2
-----------------------------------------------
Groups: /Infraestructura
State: powered off (since 2018-03-16T13:30:56.389000000)
NIC 1: MAC: 080027D40320, Attachment: Bridged Interface 'eth1.15', Cable connected: on
NIC 2: MAC: 080027660656, Attachment: Bridged Interface 'eth1', Cable connected: on
NIC 3: MAC: 0800270D3D9E, Attachment: Bridged Interface 'eth0', Cable connected: on
Capture screens: 0
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
如何做到这一点?我想了解如何阅读信息并仅使用 bash 显示该部分。
这似乎可以解决问题: