Community discussions

MikroTik App
 
letabawireless
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 63
Joined: Thu Jul 26, 2012 5:11 pm

And statement

Thu Jul 26, 2012 5:15 pm

Hi

So Im kind of new to scripting. I have a simple idea: i have a rb750 with 5 interfaces. I have 3 disabled interfaces. I have commented on of them with the comment "suspect". So my script needs to enable all disabled interfaces, except of those that have the comment "suspect".

My idea was as follows:

interface ethernet set (([/interface ethernet find where disabled=yes]) && ([/interface ethernet find where comment="suspect"])) disabled=no

Don't shout if its a silly fault. Script Error: cannot compute logical "and" of nothing and nothing

Thanks in advance.
Wimpie :)
 
User avatar
c0d3rSh3ll
Long time Member
Long time Member
Posts: 558
Joined: Mon Jul 25, 2011 9:42 pm
Location: [admin@Chile] >

Re: And statement

Fri Jul 27, 2012 7:55 am

add a comment to other interfaces "secure"

for enable
inter ethernet enable [find comment=secure ]

for disable
inter ethernet disable [find comment=secure ]
nothing
 
letabawireless
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 63
Joined: Thu Jul 26, 2012 5:11 pm

Re: And statement

Fri Jul 27, 2012 9:17 am

Hi

Not really what I had in mind. I have also done two rules now based on that idea, but was hoping to do everything in one rule. My goal is not really to get it done, but to find better ways of scripting.

Who is online

Users browsing this forum: Jotne and 20 guests