1. if
1
2
3
4
5
6
7
if [ test ]; then
xxxx
elif [ test ]; then
xxxx
else
xxxx
fi
  1. for
1
2
3
for it in list; do
xxxx $it
done
  1. while
1
2
3
while [ test ]; do
xxxx
done
  1. case
1
2
3
4
5
6
7
8
case $var in
"a")
xxxx;;
"b")
xxxx;;
*) #default
xxxx;;
esac