The man
page 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.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…