Conditionally perform commands based on pattern matching.
Synopsis
case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac
Description
Match WORD against each PATTERN and execute the corresponding COMMANDS. Patterns support shell glob syntax (*, ?, [...]). Runs in the just-bash WASM shell inside SLICC.
Examples
$ case "$1" in start) echo "Starting";; stop) echo "Stopping";; *) echo "Unknown";; esac
Match a variable against patterns.
See Also
if, test, select