syntax error near unexpected token `('
ok, so I think the answer has to do with &quot;curly&quot; quotes or &quot;smart&quot; quotes as opposed to &quot;straight&quot; quotes.
I had been using a text editor to edit the script. However, when I switched to an actual code editor, it noticed several &quot;curly&quot; quotes. I replaced those with straight quotes and all is well.