January 2001
Intermediate to advanced
480 pages
7h 22m
English
case value in
| pattern1) | commands1;; |
| pattern2) | commands2;; |
| . . . | |
| patternn) | commandsn;; |
esac
Execute commands associated with the pattern that matches value.
for variable in word1 word2. . . wordn
do
commands
done
Execute commands once for each word, setting variable to successive words each time.
for variable
do
commands
done
Execute commands once for each positional parameter, setting variable to successive positional parameters each time.
if command1
then
commands
fi
Execute commands if command1 returns a zero exit status.
if command1
then
commands2
else
commands3
fi
Execute commands2 if commands1 returns a zero exit status, otherwise execute commands3.
if command1
then
commands
elif command2
then
commands
. . .
elif commandn
then ...
Read now
Unlock full access