grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Mathcing the mac doesn't work


From: Mathias Radtke
Subject: Mathcing the mac doesn't work
Date: Fri, 27 Oct 2017 16:31:23 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0

Hi

I am currently trying to match the mac address in grub

regexp --set=1:m1 --set=2:m2 --set=3:m3 --set=4:m4 --set=5:m5 --set=6:m6 '^([0-9a-f]{1,2})\:([0-9a-f]{1,2})\:([0-9a-f]{1,2})\:([0-9a-f]{1,2})\:([0-9a-f]{1,2})\:([0-9a-f]{1,2})' "$net_default_mac"
set mac=${m1}-${m2}-${m3}-${m4}-${m5}-${m6}

I need them formated like 01-AF-FE-AF-FE-AF-FE.
However all I can see that 01------ is requested. It seems the matching isn't working.

Can someone help me with the regexp ?
Cheers

--
Mathias Radtke


---
http://uib.de/de/support-schulung/schulung/

---
uib gmbh
Bonifaziusplatz 1B
55118 Mainz

Tel. 06131 / 27561-16 <phone:061312756116>
Fax  06131 / 27561-22 <phone:061312756122>

E-Mail: address@hidden
Internet: www.uib.de

Geschäftsführer: dr. detlef oertel & erol ueluekmen
Handelsregister: Amtsgericht Mainz HRB 6942




reply via email to

[Prev in Thread] Current Thread [Next in Thread]