Code: Select all
/ip dhcp-server network
:put "$domain"
:put [ :typeof "$domain" ]
:put [ :typeof ".lan" ]
:put [ find domain="$domain" ]
:put [ find domain=".lan" ]
:local somethingDifferent "$domain"
:put [ find domain="$somethingDifferent" ]
Code: Select all
.lan
str
str
*2;*1
*1
*1
I added the final lines naming the variable something else and, bam, it works...
I've checked this with other things as well like
Code: Select all
:put [find comment="$comment"]
Honestly I'm not sure what is happening internally and why it works like this, but I really think it shouldn't. The substitution should happen before or as soon as we enter the internal scope of "find". I would expect variable substitution to always be identical to substituting the same value by hand, if I give something an argument I should not have to care about what variable names are used internally by that command/function.
Is this a known limitation, or is it a bug?