Community discussions

MikroTik App
 
SergeyUshakov
just joined
Topic Author
Posts: 3
Joined: Sat Mar 09, 2019 8:17 pm

'find' command returns nothing

Sat Mar 09, 2019 8:35 pm

Hi all,

I did not do much RouterOS scripting before, and now I have encountered unexpected behavior of the 'find' command.

I could not make it return anything, even without any arguments. If I issue command `/ip address print`, I get a list of IP addresses for all active interfaces. At the same time command `/ip address find` just silently returns nothing.

What is the trick? Do I miss anything or do in a wrong way? Is there any magic toggle for the 'find' command to be enabled?

Any ideas are most appreciated...

Thanks,
Sergey
 
User avatar
eworm
Forum Guru
Forum Guru
Posts: 1071
Joined: Wed Oct 22, 2014 9:23 am
Location: Oberhausen, Germany
Contact:

Re: 'find' command returns nothing

Sun Mar 10, 2019 9:40 pm

'find' is not supposed to print anything, it returns information other commands can use, something like:
/ ip address remove [ find where interface="etherX" ]
... will remove all ip addresses from interface "etherX".
 
SergeyUshakov
just joined
Topic Author
Posts: 3
Joined: Sat Mar 09, 2019 8:17 pm

Re: 'find' command returns nothing

Fri Jan 07, 2022 7:04 pm

'find' is not supposed to print anything, it returns information other commands can use
Thank you eworm. Unfortunately I was not aware of topic subscriptions not being implicit, so I've failed to see you response earlier.

I am aware now of the `:put` command, so my problem is solved, still thank you for responding :)

Who is online

Users browsing this forum: No registered users and 52 guests