1#! /bin/bash 2 3function f1 { 4 echo "function f1 was called!" 5} 6 7if [ $# -ne 1 ]; then 8 echo "wrong usage!" 9 echo "usage: $0 1/0" 10else 11 if [ $1 = 0 ]; then 12 echo "no funtion call!" 13 elif [ $1 = 1 ]; then 14 f1 15 else 16 echo "wrong parameter!" 17 fi 18fi 19exit 0 20 21