using a built-in variable containing a hyphen

I am using the bandwidth-test function to test a VPN link from a script in Winbox.

{/tool bandwidth-test ###.###.##.### direction=both duration=10s protocol=tcp user=admin password=#### do={ :set TxL $duration}};
:log info $TxL

The above gives me the final “duration” succesfully. However I actually want “rx-current” and “rx-10-second-average”.

As soon as I introduce a variable with a hyphen the script won’t run.

{/tool bandwidth-test ###.###.##.### direction=both duration=10s protocol=tcp user=admin password=#### do={ :set TxL $rx-current}};

Using RB450 and v3.25 via Winbox

Any ideas

put quotes around it ?

exactly $“variable-with-hypen-in-the-middle”

simple test:

:global "variable-with-hyphens-in-the-middle" lala
:put $"variable-with-hyphen-in-the-middle"