how to case statemetn else bash code example
Example 1: bash case statement
case expression in
pattern1 )
statements ;;
pattern2 )
statements ;;
...
esac
Example 2: bash switch case
case $1 in
start)
#Start logic
;;
stop)
# Stop logic
;;
*)
# Default logic
echo $"Usage: $0 {start|stop}"
exit 1
;;
esac