case语句
1 #! /bin/bash
2 #case judagement condition expression
3 var=$1
4 program=$0
5
6 case $var in
7 -h)
8 echo usage:$program -option
9 echo option: -h -f
10 ;;
11 -f)
12 echo $var
13 ;;
14 *)
15 echo usage:$rogram -option
16 echo option: -h or -f
17 exit 0
18 esac