Page 1 of 1

Some help with script

Posted: Thu Nov 23, 2017 4:45 am
by prince1990love
hello everybody
i need some help
i have mikrotik and 75 radio vendor "ubnt" i want get just identity from /ip neighbor and use command "put" in terminal to show the radios as list with just identity name
and here is my code
{
:local identity [/ip neighbor get value-name=identity number=[/ip neighbor find]];
:put $identity
}
but it's not working like list it's only print one identity name
i want print like "list"
How?

Re: Some help with script  [SOLVED]

Posted: Thu Nov 23, 2017 6:15 pm
by PaulsMT
hello everybody
i need some help
i have mikrotik and 75 radio vendor "ubnt" i want get just identity from /ip neighbor and use command "put" in terminal to show the radios as list with just identity name
and here is my code
{
:local identity [/ip neighbor get value-name=identity number=[/ip neighbor find]];
:put $identity
}
but it's not working like list it's only print one identity name
i want print like "list"
How?
 foreach neighbor in=[ip neighbor find] do={
    :put [ip neighbor get $neighbor identity];
 }

Re: Some help with script

Posted: Thu Nov 23, 2017 8:31 pm
by prince1990love
very very thanks PaulsMT :D
it's working like a charm