First page Back Continue Last page Graphics
Loops: The for Statement
(Quigley pages 903 – 907)
The do-done block is executed once for each word in the wordlist, assigning each word in turn to the variable. If "in wordlist" is omitted, the positional parameters $@ from the caller starting at $1 are used in its place.
for variable in wordlist; do
statements
done
As stated above, the PDL will look like this:
FOR description of wordlist
statements
END FOR