D
D
Denis2020-09-08 17:19:12
Mikrotik
Denis, 2020-09-08 17:19:12

How to correctly list the elements of a specific List from the Interface list in a Mikrotik script?

There is a need to perform some actions (eg enable / disable) with the interfaces specified by a specific List in the Interface list from the script. After some experimentation, I wrote something like:

:foreach ifacenum in=[/interface list member find list=disable-list] do={/interface disable [/interface list member get $ifacenum interface];}

However, this approach has several drawbacks, firstly, it does not pay attention to the on / off of the list elements, and secondly, it does not see the Include / Exclude interfaces of a specific list. Plz tell me how to do it right.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question