I would like to implement a quite simple function but an error occurs on the condition used.
function test()
{
checkstatus
echo ${currentStatus}
if [ "$currentStatus" == "true" ]
then
echo "Currently Ok"
else
exit_error 101
fi
}
test
However the script returns :
true
./script.sh: line 4: [: missing `]'
Aucun commentaire:
Enregistrer un commentaire