Php error - syntax error near unexpected token

From thelinuxwiki
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 )