linux - Syntax error near unexpected token `done' whis done written -


i have problem done. says have typo error can't figure what's wrong @ all. here code:

#./bin/bash until [$err == 0];     java -xms512m -xmx512m -cp lib/*:lib/umad/*:mysql-connector-java-5.1.15-bin.jar:l2jfrozen-core.jar com.l2jfrozen.gameserver.gameserver     err=$?     sleep 5 done 

your shebang line wrong. #./bin/bash not execute bash.

it should read #!/bin/bash. using shell other bash invoke script.

also, beware [$err == 0] line expands value of $err, empty string, unless has been exported. if it's empty, result in error, because bash interpreting [ == 0].

the safest approach this:

unset err until [ "$err" == "0" ];     # etc... done 

Comments

Popular posts from this blog

searchKeyword not working in AngularJS filter -

sequelize.js - Sequelize: sort by enum cases -

user interface - how to replace an ongoing process of image capture from another process call over the same ImageLabel in python's GUI TKinter -