Community discussions

just joined
Topic Author
Posts: 1
Joined: Wed Sep 12, 2018 3:24 pm

Problem with script

Wed Sep 12, 2018 3:36 pm

I need to delete a list of addresses using index number.
Using the command from the terminal works, example:
/ip firewall address-list remove numbers=6
but using it in a script does not work.
possible solutions?
User avatar
Member Candidate
Member Candidate
Posts: 217
Joined: Thu Sep 21, 2017 7:16 pm
Location: Iraq, Ninavah

Re: Problem with script

Thu Sep 13, 2018 7:47 pm

may be "no such item"
use this command to see what is the output
:put [/ip firewall address-list remove numbers=6 ]
Long time Member
Long time Member
Posts: 622
Joined: Tue Aug 11, 2015 12:46 pm
Location: Netherlands

Re: Problem with script

Thu Sep 13, 2018 8:54 pm

Index numbers are put in buffer after print command. You cannot blindly use these numbers in script.

Use find command instead, based on properties:
/ip firewall address-list remove [ find list=<name> address=<address> ]

Who is online

Users browsing this forum: No registered users and 6 guests