/ip firewall address-list export file=AddList.rsc
How do I use the above in a script to export only the two desired list "DHCP" and "CutOff"?
Help appreciated new to scripting. very powerful tool..
Greg
{
/ip firewall address-list
:local myList {"DHCP";"CutOff"}
:local output "/ip firewall address-list\r\n"
:foreach i in=[find] do={
:local name [get $i list]
:foreach j in=$myList do={
:if ($name = "$j") do={
:set output ($output . "add address=$[get $i address] list=$name\r\n")
}
}
}
:put $output
}