option="${1}"
case ${option} in
1) do A
do B
;;
2) do A
do B
do C
;;
3) do A
do B
do C
;;
esac
Above, I am repeating 'do C' for case 2 & 3. Instead of this redundancy, is there a way I can define a case that applies to all cases, except case 1 or a case which applies to case 2,3,5) (basically whichever case I want)
like:
allExceptCase1)
OR Only2,3,5AndNotTheOthers)