Config - Interface mac variable and last four?

Hi,

I’m writing an rsc file for our CPE. I can see that I can grab the interface mac by using:

:local macaddress [/interface get ether1 mac-address]; :put $macaddress

But how can I select the last four characters and remove the colon?

The idea is to set the wifi SSID as our company name and the last four from the mac. e.g. “Vispa 2G 0FD2”

Any help would be appreciated.

Use the :pick function. You may also need to use :tostr and :tonum (“0x” . $whatever) appropriately, depending on what you need to have in hand for intermediate values.