[prev] [index] [next]

Loop commands

while loops iterate based on a test command list:

while testList
do
   commandList
done

for loops set a variable to successive words from a list:

for var in wordList
do
   commandList  # ... generally involving  var
done