The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 807 - File: showthread.php PHP 7.3.15 (Linux)
File Line Function
/showthread.php 807 errorHandler->error





Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Scripting question
2018-10-18, 01:13
Post: #1
Scripting question
I have following script:

set attempt:int32 0
set maxtries:int32 5
:retry_dhcp
sleep 5
inc attempt
iseq ${attempt} ${maxtries} && goto max_attempts ||
echo DHCP Attempt ${attempt} of ${maxtries}
dhcp || goto retry_dhcp
.....

max_attempts:
....

The values of maxtries and attempt are displayed with expected values by the echo statement. But the attempt equals 5 the script does got to max_attempts.

I tried iseq ${attempt} 5 && goto mac_attempts first but that did not work either.

What is the recommend way to test two numeric values .
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Scripting question - ebruno - 2018-10-18 01:13
RE: Scripting question - ebruno - 2018-10-18, 16:32



User(s) browsing this thread: 1 Guest(s)