The CASE statement

Syntax

case variable in
    value )
        command
        ;;
esac

Discussion

  • The value) command ;; branch may be repeated as needed.
  • The last branch closing mark ;; is not necessary, but we advise to end also the last branch with a closing mark.
  • command may be a single command or multiple commands, which are either placed on different lines or divided by ; on the same line.

2020–07–04