Hello,
Im trying to do a loop with while but it doesn’t work.
The code is:
:while ($cont = 4) do={
:set /int set $cont enabled;
:put ($cont+1);
}
any idea???
Thanks
Hello,
Im trying to do a loop with while but it doesn’t work.
The code is:
:while ($cont = 4) do={
:set /int set $cont enabled;
:put ($cont+1);
}
any idea???
Thanks
Your script doesn’t make sense
Script should be something like:
{
:local cont 0
:while ($cont < 4) do={
:set cont ($cont+1);
:put $cont
}
}
Hello
I try it but not working
{
:local contador 0
:while ($contador < 4) do={
:set /int set $cont enabled;
:delay 2;
:set ($contador+1)
:put $contador
}
}
It will not work because syntax is invalid ..
At first cont variable is undefined
second :set is used in some funky way, please look at my example how :set command is used.
And the third I guess you want to enable interfaces, but you can’t use number like 1,2,3,4 in the scripts.
to enable interfaces use something like
/interface enable [find name=“ether1”]