2013-08-22 03:34:11 +02:00
|
|
|
# To implement a for loop:
|
2013-08-11 21:37:11 +02:00
|
|
|
for file in `ls .`;
|
2013-09-01 21:40:10 +02:00
|
|
|
do
|
|
|
|
echo $file found;
|
2013-08-11 21:37:11 +02:00
|
|
|
done
|
2013-08-12 04:09:29 +02:00
|
|
|
|
2013-08-22 03:34:11 +02:00
|
|
|
# To implement a case command:
|
2013-08-12 04:09:29 +02:00
|
|
|
case "$1"
|
|
|
|
in
|
|
|
|
0) echo "zero found";;
|
|
|
|
1) echo "one found";;
|
|
|
|
2) echo "two found";;
|
2013-11-03 20:26:56 +01:00
|
|
|
3*) echo "something beginning with 3 found";;
|
2013-08-12 04:09:29 +02:00
|
|
|
esac
|