!= Bug?

[admin@MikroTik] > /user print
Flags: X - disabled

NAME GROUP ADDRESS

0 ;;; system default user
admin full 0.0.0.0/0
1 user1 full 0.0.0.0/0
2 user2 full 0.0.0.0/0

[admin@MikroTik] > :foreach i in=[/user find comment=""] do=[:put [/user get $i name]]
user1
user2
[admin@MikroTik] > :foreach i in=[/user find comment!=""] do=[:put [/user get $i name]]
no such argument (comment!)
[admin@MikroTik] >

Above is output from 2.9.5 x86 and mips.

Anyone know how to correctly do compare unequal?

maybe try to left one space between ‘comment’ and “!=”.

Edgars

tried

:foreach i in=[/user find comment !=“”] …
:foreach i in=[/user find comment != “”] …
:foreach i in=[/user find comment != “”] …

all errored with

no such argument (=)

find command may only check equasions (i.e., whether the value of the given property is equal to something). please use something like that:

:foreach i in=[/interface find] do={:if ([/interface get $i type] != “ether”) do={ :put $i}}

thank you for the last reply, confirmed the following works:

:foreach i in=[/user find] do={:if ([/user get $i comment]!=“”) do=[:put [/user get $i name]]}