jeudi 14 mars 2019

checking if a string is contained in other string in shell

if I run this, it doesnt print yes.

if [s == [Ss]] then echo "yes" fi

However, if I write double [], so will be like

if [[s == [Ss]]] then echo "yes" fi

it prints yes

I wonder WHY

Aucun commentaire:

Enregistrer un commentaire