dimanche 3 janvier 2016

Shell script: Why can't the if statement make a logical comparison?

I'm new to Unix and Linux in general and failed to make a logical comparison within an if statement.

I'm sure this is a very basic mistake but I just can't find the error.

if (7+3 == 10); then
    echo "nice this works"
elif (7+3 == 73); then
    echo "to bad string concatenation"
else
    echo "I really don't understand shell"
fi

Echo: I really don't understand shell.

Aucun commentaire:

Enregistrer un commentaire