Hi,
How can i count the number of records for a specific list name?
/ip firewall address-list print count-only list=ch1
214
The “count-only” command returns all the records, not just the “ch1” list records.
Thanks.
Hi,
How can i count the number of records for a specific list name?
/ip firewall address-list print count-only list=ch1
214
The “count-only” command returns all the records, not just the “ch1” list records.
Thanks.
Try this:
:put [:len [/ip firewall address-list find list=ch1]]
or to assign count to a variable:
:local listcount [:len [/ip firewall address-list find list=ch1]]
The counting of a specific list is actually a bug that i’ve been bugging MT to fix. It’s been broken since about 2.9.30 or so. They told me they will fix it at least 3 times now. Please send a supout and a request to have them fix it as well.
Sam
In v3 it is working fine:
/ip firewall address-list print count-only where list=someList