[ case statement sample in shell script ]
# ****************** Begin of Main ******************
# ----------------------------------------------------- #
case "$1" in
A) # To check A
A_CHK
;;
B) # To check B
B_CHK
;;
C) # To check C
C_CHK
;;
D) # To check D
D_CHK
;;
E) # To check E
E_CHK
;;
ALL)
A_CHK
B_CHK
C_CHK
D_CHK
E_CHK
;;
*)
echo "usage: $0 A|B|C|D|E"
exit 1
;;
esac
No comments:
Post a Comment