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: [email protected]
Internet: www.uib.de

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


_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to