August 1999
Intermediate to advanced
1000 pages
83h 9m
English
for word [in wordlist...] ; do actions; done
foreach word (wordlist) ... end repeat count command
for word [in wordlist...] ; do actions; done
You can use loops in shell scripts to control the flow of execution in a script. A loop is an iterative mechanism that repeats a sequence of instructions until a predetermined condition is met. The for/foreach loop executes a list of commands one time for each value of a loop variable.
Each time a for command is executed, word is set to the next item taken from the in wordlist . If you omit in wordlist ..., then the for command executes the do actions once for each positional parameter that ...
Read now
Unlock full access