Community discussions

 
Ehman
Member
Member
Topic Author
Posts: 363
Joined: Mon Nov 15, 2010 10:49 pm

remove namefilter address-list

Mon Jun 16, 2014 1:19 am

Hi

Can someone help me with this one

I need a script that removes all the address-list entry's that starts with "T-"

I've tried everything, I cant figure it out

Here is my script that removes everything in my address-list
:foreach counter in=[/ip firewall address-list find ] do={/ip firewall address-list remove $counter}
 
User avatar
c0d3rSh3ll
Long time Member
Long time Member
Posts: 558
Joined: Mon Jul 25, 2011 9:42 pm
Location: [admin@Chile] >

Re: remove namefilter address-list

Mon Jun 16, 2014 7:08 am

I need a script that removes all the address-list entry's that starts with "T-"

ros code

/ip firewal address-list remove [find list~"T-"]
Here is my script that removes everything in my address-list
for remove everything in your address list the best way is

ros code

/ip firewal address-list remove [find]
nothing
 
Ehman
Member
Member
Topic Author
Posts: 363
Joined: Mon Nov 15, 2010 10:49 pm

Re: remove namefilter address-list

Mon Jun 16, 2014 1:40 pm

thx :)
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 2946
Joined: Tue Feb 25, 2014 12:49 pm
Location: Capalbio, Tuscany, Italy

Re: remove namefilter address-list

Mon Jun 16, 2014 2:42 pm

>>>I need a script that removes all the address-list entry's that starts with "T-"
starts?

this is wrong, this is containing "T-":

ros code

/ip firewal address-list remove [find list~"T-"]
use this:
/ip firewal address-list remove [find where list~"^T-"]
I'm Italian, not English. Sorry for my imperfect grammar.
 
Ehman
Member
Member
Topic Author
Posts: 363
Joined: Mon Nov 15, 2010 10:49 pm

Re: remove namefilter address-list

Mon Jun 16, 2014 2:53 pm

Thx

Who is online

Users browsing this forum: No registered users and 4 guests