SED regular expression "MAC address" Glpi convert Huawei Switch mac format

Source: Internet
Author: User
Tags glpi

Format before conversion

The converted Format


80:d0:9b:0e:13:**

60:f8:1d:c9:cb:**

98:fe:94:3d:32:**

bc:85:56:3d:d9:**


[Email protected] huawei.mac.manager]# mysql-h192.168.*****-pa****-ne "Use Glpi;select glpi_ Devicenetworkcards.designation, Upper (Glpi_items_devicenetworkcards.mac) from Glpi_items_devicenetworkcards,glpi_ Devicenetworkcards where glpi_items_devicenetworkcards.devicenetworkcards_id = Glpi_devicenetworkcards.id and Glpi_ Devicenetworkcards.designation=\ "Wireless\" "| Egrep-o "([0-9a-fa-f]{2}) (([[/\s:][0-9a-fa-f]{2}) {5})" | Sed ' s/://g ' |sed-r ' s/^ (. { 4}) (. { 4}) (. { 4}) $/\1-\2-\3/g '


80d0-9b0e-13**

60f8-1dc9-cb**

98fe-943d-32**

bc85-563d-d9**

SED regular expression "MAC address" Glpi convert Huawei Switch mac format

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.