Quantcast
Channel: MikroTik
Viewing all articles
Browse latest Browse all 15394

Scripting • Why is this so hard???

$
0
0
I don't understand (clearly) what I'm doing wrong. I've tried a million variations. Here are 2 ways that don't work:
Code:
:local stringexec "/ip dhcp-server lease :foreach i in=[find] do={ :put ([get $i comment].",".[get $i address].",".[get $i mac-address].",".[get $i host-name]) }":execute $stringexec file=temp1.txt
Code:
:foreach i in=[/ip dhcp-server lease find] do={:put ([get $i comment].",".[get $i address].",".[get $i mac-address].",".[get $i host-name])}file="test1.txt"

Statistics: Posted by Josephny — Tue Jan 09, 2024 12:31 am



Viewing all articles
Browse latest Browse all 15394

Trending Articles