When I try to run the following .sh code on my MacOS I get an error: "repetition-operator operand invalid"
Sounds like two repetition operators occur consec