简体   繁体   中英

Grep mac address separated by period

I want to grep mac address separated by a period, but I don't know how to grep 4ddd.8a5b.080c VLAN 14 in this line:

For example:

Internet  192.168.15.24     0         4ddd.8a5b.080c  arpa   VLAN 14

在提取所需的列之前,此sed将首先匹配VLAN 14

sed '/VLAN 14/ {s/.*0         \(.*\) arpa \(.*\)/\1\2/}' input_file

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM