lundi 8 décembre 2014

"If variable does not contain" not working


This is my script



if [[ ! $url == *.txt ]]
then
exit
fi


I have also tried:



if [[ ! "$url" == *.txt ]]
then
exit
fi


and:



if [[ "$url" !== *.txt ]]
then
exit
fi


But even though $url does contain *.txt it still exits?



Aucun commentaire:

Enregistrer un commentaire