lundi 2 février 2015

too many arguements in in if statement


this is my first "if-else" script on linux. It gives the error

[: too many arguments


Code:



n=0
if [ $n % 2 -eq 0 ]
then
echo "even number"
fi


How to correct it.



Aucun commentaire:

Enregistrer un commentaire