|
for x in 1 2 3 4 5 do # some processing... done
The For loop is the most used looping construct when there is a specified set to iterate over.
|
|
CREATED 2017-08-23 16:33:59.0
|
00-2A-7C
|
UPDATED 2017-08-23 16:34:21.0
|
|
|
|
x=1 while [ x -le 10 ] <-- Make sure there is a space between the brackets and anything else do # some processing done
The while do done is another one of the useful loop constructs in bash. When the loop is bases on a condition or breaking out will be determined during the loop, the while, do done is your construct.
|
|
CREATED 2017-08-23 16:39:17.0
|
00-2A-7D
|
UPDATED 2017-08-31 23:32:09.0
|
|
|