Syntax err near unexpected token...

I've been looking at this code too long. Maybe a fresh set of eyes can spot the:

"syntax error near unexpected token `(' ./phmenu `            tput cup 18 4: echo "Accept? (y) es or (n)o: " 

This is the line in the code:

 
tput cup 18 4; echo "Accept? (y)es or (n)o: "

Thanks In Advance

---------- Post updated at 09:31 PM ---------- Previous update was at 09:29 PM ----------

Is shell complaining about the "?" Is there a way I can check for extraneous characters on that line?

That line works for me in bash. You may want to look before that line in the script. 99% of the time I get that error, it's from missing a quotation mark somewhere before the line it's telling me the error is in.

E.g., if I put an echo with only one quote mark on the line before, I get the same error as you.

# cat test
#! /bin/sh
echo "
tput cup 18 4; echo "Accept? (y)es or (n)o: "
# ./test
./test: line 3: syntax error near unexpected token `('
./test: line 3: `tput cup 18 4; echo "Accept? (y)es or (n)o: "'
#

This

"syntax error near unexpected token `(' ./phmenu `            tput cup 18 4: echo "Accept? (y) es or (n)o: " 

isn't the same as this

 
tput cup 18 4; echo "Accept? (y)es or (n)o: "

So either you've made a typo when writing the error message or when writing the line.

You post your full code.It will make us easy to find and correct the error in it.