qschulz_ has quit [Remote host closed the connection]
qschulz has joined #u-boot
hanetzer has quit [Ping timeout: 260 seconds]
hanetzer has joined #u-boot
vagrantc has quit [Quit: leaving]
goliath has quit [Quit: SIGSEGV]
rvalue has quit [Ping timeout: 248 seconds]
rvalue has joined #u-boot
teejay has quit [Quit: leaving]
teejay has joined #u-boot
_whitelogger has joined #u-boot
teejay has quit [Quit: leaving]
hanetzer has quit [Ping timeout: 252 seconds]
teejay has joined #u-boot
hanetzer has joined #u-boot
Stat_headcrabbed has joined #u-boot
persmule has quit [Remote host closed the connection]
haritz has quit [Quit: ZNC 1.8.2+deb3.1+deb12u1 - https://znc.in]
teejay has quit [Quit: leaving]
teejay has joined #u-boot
teejay has quit [Client Quit]
teejay has joined #u-boot
teejay has left #u-boot [#u-boot]
clamor has quit [Ping timeout: 260 seconds]
clamor has joined #u-boot
bjoto has quit [Remote host closed the connection]
bjoto has joined #u-boot
warpme has joined #u-boot
mrkiko has joined #u-boot
<mrkiko>
Hello all!! Needing some help with setexpr + regex magic :) I have a MAC address stored like 112233445566 and need to convert it to 11:22:33:44:55:66 . I am trying with sub / gsub, but at the moment I am not able to get regex right. Any suggestion / pointer / trick? :D
gsz has joined #u-boot
clamor has quit [Ping timeout: 252 seconds]
rvalue has quit [Read error: Connection reset by peer]
rvalue has joined #u-boot
warpme has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sally has quit [Ping timeout: 272 seconds]
Stat_headcrabbed has quit [Remote host closed the connection]
naoki has joined #u-boot
naoki has quit [Client Quit]
<mrkiko>
Thanks to all
Poltawer has joined #u-boot
<marex>
mrkiko: extract each byte into separate variable, then setenv mac $var1:$var2:...
<mrkiko>
marex: how may perform that extraction? I gues setexpr and %c format specified, but I am able to extract the first only
<marex>
=> setenv foo 1234abcdef56 ; setexpr bar $foo \& 0xff00000000 ; setexpr bar $bar / 0x100000000 ; pri foo bar
<marex>
foo=1234abcdef56
<marex>
bar=34
<marex>
it is a number after all
<marex>
maybe there is some smarter way
<mrkiko>
... ok, you gave me food for tought. So I am grateful. Trying it out now :)
<marex>
=> setenv foo 1234abcdef56 ; setexpr bar gsub "\(..\)" "\\1:" $foo ; pri foo bar
<marex>
foo=1234abcdef56
<marex>
bar=12:34:ab:cd:ef:56:
<marex>
well look at that ... backrefs do work too
<mrkiko>
yeah, works beautifully. Oh, I should learn regexes
_whitelogger has joined #u-boot
Poltawer has quit [Ping timeout: 265 seconds]
Poltawer has joined #u-boot
warpme has joined #u-boot
hanetzer has quit [Ping timeout: 276 seconds]
hanetzer has joined #u-boot
persmule has joined #u-boot
clamor has joined #u-boot
Poltawer has quit [Quit: WeeChat 4.6.3]
dsimic has quit [Ping timeout: 252 seconds]
dsimic has joined #u-boot
goliath has joined #u-boot
hanetzer has quit [Ping timeout: 260 seconds]
warpme has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ikarso has quit [Quit: Connection closed for inactivity]
ja_02 has joined #u-boot
Poltawer has joined #u-boot
akaWolf has joined #u-boot
catcream has joined #u-boot
clamor has quit [Read error: Connection reset by peer]
warpme has joined #u-boot
warpme has quit [Client Quit]
sally has joined #u-boot
warpme has joined #u-boot
warpme has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]