mardi 11 mai 2021

Stuck on if or loop [duplicate]

I was making a bash script for my Linux. But I am stuck on if or loop. If I select yes it's spamming ==yes.

 echo "Found a previously saved file. Do you want to continue with this? (Yes/No)"
    read Response
if [["$Response" == "Yes" || "$Response" == "yes" || "$Response" == "y" || "$Response" == "Y"]]; then
    echo "Success" 
    else
    echo "Fail"
    fi

Aucun commentaire:

Enregistrer un commentaire