I am trying to disable items from the address list by reading a .txt file inserted into files, but when I run the script it prompts the number of the item that I want to disable and also an error "interrupted no such item"...in other words...not working at all
This is the script
Code: Select all
:global filetext [/file get disable.txt contents];
:global filepos 0;
:global numbers;
:local linend;
:local :thisline;
:while ($filepos < ([:len $filetext]-1)) do={
:set linend [:find $filetext "\n" $filepos];
:set thisline [:pick $filetext $filepos $linend];
:set numbers [:pick $thisline 0 $linend];
:put $numbers;
:set filepos ($linend+1);
/ip firewall address-list disable "$numbers";
}
could you guys give me a hand with this? I am trying to disable some items automatically, something to work like this
Code: Select all
/ip firewall address-list disable 0;
/ip firewall address-list disable 3;
/ip firewall address-list disable 8;