While loop in shell <p>I am trying to run while loop in shell </p> <pre><code> NODESTATE="0" LOOPC="1" while [ "$NODESTATE" -ne "UP" ]; do echo "node is up " </code></pre> <p>but it is throwing me an error with [: UP: integer expression expected or shoud i use != instead of -ne </p>