how to remove interface with no comment?

I have 4 ppp-client
for 2 of them I put comment .
I want to remove the other 2 with a script

if I do this

/interface ppp-client remove [find where comment!=0]

it remove me the 2 with comment ,
have try

/interface ppp-client remove [find where comment=0]

but it doesn’t do nothing

so what to do ?

Thanks,

use “”!

Do

/interface ppp-client remove [find where comment=“remove this”];

or

/interface ppp-client remove [find where comment!=“do not remove this”];

O.K.

now I have 2 ppp-client I don’t want to remove
how can I keep both of them ? how do I use "and & " for it?
can I do this?

/interface ppp-client remove [find where comment!="test1"]&&[find where comment!="test2"];

Use my example…

You know that you can put same comment on more than one ppp?

I understand your script, but eventually must be writed:
/interface ppp-client remove [find where comment!=“do not remove this 1” and comment!=“do not remove this 2”];

2 things :

  1. I don’t want to use the same comments for both of them. this is why I use comments
  2. if the other 2 don’t have comments - it doesn’t remove them.
    so I thought maybe something like this :frowning:remove only the ones with no comments)
/interface ppp-client remove [find where comment=""];

but is also doesn’t work.
Thanks ,

/interface ppp-client remove [find where (comment . “”)=“”];

Thanks!!
Can you please explain to me the structure of the command?

empty_comment = nil (nothing)

nil = “” → false (as boolean results)

nil + “” = “” (as addiction)

empty_comment + “” = “” (as addiction)

“” = “” → true (as boolean results)

Thanks,