Community discussions

MikroTik App
 
tomislav91
Member
Member
Topic Author
Posts: 303
Joined: Fri May 26, 2017 12:47 pm

one line command

Sun Oct 30, 2022 5:11 pm

Hello, i am utting from my ansible some mikrotik command and I need to put this command into one line
router v6
:global c3 "PC4SEARCH"
:foreach i in=[/ip dhcp-server lease find where host-name~$c3] do={:put ([/ip dhcp-server lease get $i address])}
i tried like this, but didn't work
{{ :local c3 "PC4SEARCH"; :foreach i in=[/ip dhcp-server lease find where host-name~$c3] do={:put ([/ip dhcp-server lease get $i address])} }} file=test.txt

Who is online

Users browsing this forum: ko00000000001 and 12 guests