Why isn't this if-else operation working? I fixed my spacing many times yet getting the error syntax error near unexpected token `elif' , I have tried using "==" instead of "=", I have tried using two third brackets but nothing seems to work.
if [ "$operation" = "+" ]
then addition()
elif [ "$operation" = "-" ]
then subtraction()
elif [ "$operation" = "*" ]
then multiplication()
elif [ "$operation" = "/" ]
then division()
fi
Aucun commentaire:
Enregistrer un commentaire