dimanche 27 septembre 2015

Bash, issue with if

I'm parsing the result of a curl call into a variable this way:

result=$(curl some curl parameters)

I'm then making a check:

if [ $result != "job completed" ];
then printf "ok"
fi

but I'm getting the following error:

[: too many arguments

any idea why?

Aucun commentaire:

Enregistrer un commentaire