Community discussions

MikroTik App
 
prince1990love
newbie
Topic Author
Posts: 32
Joined: Thu Oct 15, 2015 7:19 pm

Some help with script

Thu Nov 23, 2017 4:45 am

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?
 
User avatar
PaulsMT
MikroTik Support
MikroTik Support
Posts: 282
Joined: Tue Feb 10, 2015 3:21 pm

Re: Some help with script  [SOLVED]

Thu Nov 23, 2017 6:15 pm

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];
 }
 
prince1990love
newbie
Topic Author
Posts: 32
Joined: Thu Oct 15, 2015 7:19 pm

Re: Some help with script

Thu Nov 23, 2017 8:31 pm

very very thanks PaulsMT :D
it's working like a charm