patterns in case statement in bash scripting
- by Ramiro Rela
The man says that case statements use "filename expansion pattern matching".
I usually want to have short names for some parameters, so I go:
case $1 in
req|reqs|requirements) TASK="Functional Requirements";;
met|meet|meetings) TASK="Meetings with the client";;
esac
logTimeSpentIn "$TASK"
I tried patterns like "req*" or "me{e,}t" which I understand would expand correctly to match those values in the context of filename expansion, but it doesn't work.
Thanks.