Hi All,
I tried below code
getting error.
AD=0
ZERO=0
if [ $AD == $ZERO ] then
echo "AD is zero select another symbol"
fi
syntax error near unexpected token `fi'
plz help me to solve this error
Hi All,
I tried below code
getting error.
AD=0
ZERO=0
if [ $AD == $ZERO ] then
echo "AD is zero select another symbol"
fi
syntax error near unexpected token `fi'
plz help me to solve this error
Numerical Comparator .. Go with -eq
option instead of ==
And also ;
is missing ..
if [ $AD -eq $ZERO ] ; then
Wrong syntax.
Try this:
if [ $AD -eq $ZERO ]
then
echo "blah blah"
fi
if [$AD -eq $ZERO ]
then
echo '$AD is zero select another symbol'
fi
Thanks to all !!