page 112
> if [[ "${1-}" =~ ^-*h(elp)?$ ]]; then
> ... is an option that starts with one or multiple - characters ...
"one or multiple" is + not *. The regex above will also match "h" and "help" without - character(s).
page 112
> if [[ "${1-}" =~ ^-*h(elp)?$ ]]; then
> ... is an option that starts with one or multiple - characters ...
"one or multiple" is + not *. The regex above will also match "h" and "help" without - character(s).