How Do You Troubleshoot the Bash Error “syntax error near unexpected token”?

Problem scenario
You run a Bash script with a function that you developed yourself.  When you run the script, you get the error "syntax error near unexpected token".  What should you do to solve this?

Solution
Call the function without the parentheses.  Do not use this: contintfunc()

Use this when you call, not define, your previously defined function:

contintfunc

Leave a comment

Your email address will not be published. Required fields are marked *