Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- echo "Bienvenue sur le jeu des capitales"
- echo "Devinez la capitale du pays qui sera affiché"
- choix_pays=$(shuf -n 1 capitales.txt)
- echo $choix_pays
- capitale="$(echo $choix_pays | awk -F " -- " '{print $2}')"
- pays="$(echo $choix_pays | awk -F " -- " '{print $1}')"
- echo $pays
- echo $capitale
- for i in {0..4}; do
- read rep
- if [ "$rep" == "$capitale" ]; then
- echo "Bravo ta trouvé"
- exit
- else
- echo "Perdu"
- fi
- done
- echo "C'est finit la capitale etais" $capitale
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement