J'apprends les scripts Shell et je veux obtenir des données pour les variables
mynum
Mon script ne fonctionne pas:
#!/bin/bash
mynum
echo -n "Please enter the number to validate--->"
read mynum
if [ mynum -eq 100 ]
then
echo "mynum is equal to 100"
else
echo "mynum is not equal to 100"
fi
Aidez-moi à ce sujet.
Je l'ai finalement eu !!!
#!/bin/bash
read -p "Please enter the number to validate :" mynum
#mynum=234
if [ $mynum -eq 100 ]
then
echo "mynum is equal to 100"
else
echo "mynum is not equal to 100"
fi
./is
Please enter the number to validate :345
mynum is not equal to 100