1

[SOLVED] bash problem

view story
linux-howto

http://www.linuxquestions.org – Hello, my script ran fine on my old server, after copying to the new it will no longer run. I get this when running Code: ./bandyscript.sh: 35: ./bandyscript.sh: Syntax error: "(" unexpected (expecting "done") This is the offending code: Code: for team in 1 5 do somevar=(`echo "select ID, Datum, SentMail from Games g where Datum >= CURDATE() and Team=$team order by Datum asc LIMIT 1" | mysql -h $IP_ADDR -u$USER_NAME -p$PASSWORD $TABLE_NAME`) game=${somevar[3]} ... ... done Row 35 is the one assigning a value to somevar Turns out changing /bin/sh to / (HowTos)