:global myTest do={:return (/interface ethernet disable ether5)} 

This function is not executed when it is called. What could be the problem?

Here is what happens in the variable:

 [admin@MikroTik] > :put $myTest ;(eval (eval /returnvalue=( $/interface $ethernet $disable $ether5))) 

    1 answer 1

    CLI commands must be taken in square brackets -

     :global myTest do={:return ([/interface ethernet disable ether5])} 

    since the command is one and indivisible, it is possible without parentheses

     :global myTest do={:return [/interface ethernet disable ether5]} 

    it is very unlikely that he will be able to return something, so it can be reduced to

     :global myTest do={[/interface ethernet disable ether5]} 

    for it to work it is not necessary to call [admin@MikroTik] > :put $myTest
    enough [admin@MikroTik] > $myTest