SCRIPT :
IMAGE=$imgvalue;
if [ $imgvalue :=1 ]
then
echo DO=ABC;
elif [ $imgvalue :=2 ]
then
echo DO=ETC;
elif [ $imgvalue :=3 ]
then
echo DO=XYZ;
else
echo "$imgvalue is unsupported";
exit 1;
fi
In the script above, IMAGE=1
, IMAGE=2
, IMAGE=3
whatever may be the value I have assigned. It's showing only DO=ABC
. Other conditions not working. Can anyone explain what's wrong with my script?