I'm not a good Shell Script expert. Can somebody help me to understand and explain the statement [ ! -z ${TRUE:-} ] && [ ${TRUE:-} == 'true' ] &&
from the following snippet. What is this specific statement doing and/or being validated for?
However, am able to understand this statement: TRUE=$($JBOSS_TWIDDLE get jboss.system:type=Server Started |grep Started |cut -d"=" -f2)
. This basically calling a JBoss's JMX command-line tool to check the server start status.
Code Snippet:
while [ $i -lt 180 ]; do
TRUE=$($JBOSS_TWIDDLE get jboss.system:type=Server Started |grep Started |cut -d"=" -f2)
[ ! -z ${TRUE:-} ] && [ ${TRUE:-} == 'true' ] && {
echo "The $JBOSS_NAME server is up and running."
return
}