Answer the question
In order to leave comments, you need to log in
Why does the script do /r/n at the end of the line?
:local listName "rdp_blacklist";
:local fileName "test.txt";
:local script2write "
:local counter;
:foreach counter in= [/ip firewall address-list find list=$listName] do={
:local ip [/ip firewall address-list get \$counter address];
:put \$ip;
};
";
:put $script2write;
:execute script=$script2write file=$fileName;
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question