syntax error near unexpected token `('

Solution 1:

ok, so I think the answer has to do with "curly" quotes or "smart" quotes as opposed to "straight" quotes.

I had been using a text editor to edit the script. However, when I switched to an actual code editor, it noticed several "curly" quotes. I replaced those with straight quotes and all is well.