Php error - syntax error near unexpected token

From thelinuxwiki
Revision as of 15:44, 24 May 2013 by Nighthawk (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Problem description:

Error when runing bash script..

 11:59AM:host:6828> ./addon-update-2.sh                                                                                                                                                                            
 ./addon-update-2.sh: line 59: syntax error near unexpected token `('
 ./addon-update-2.sh: line 59: `     ADDNUM= ( $line )'

zsh: exit 2 ./addon-update-2.sh


Solution

Remove the blank space after the = sign in the line of code.

code:

59 ADDNUM= ( $line )

should be..

59 ADDNUM=( $line )