SHARE
TWEET

Untitled

a guest Oct 21st, 2019 80 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2.  
  3. echo "Bienvenue sur le jeu des capitales"
  4. echo "Devinez la capitale du pays qui sera affiché"
  5.  
  6. choix_pays=$(shuf -n 1 capitales.txt)
  7. echo $choix_pays
  8.  
  9. capitale="$(echo $choix_pays | awk -F " -- " '{print $2}')"
  10. pays="$(echo $choix_pays | awk -F " -- " '{print $1}')"
  11. echo $pays
  12. echo $capitale
  13. for i in {0..4}; do
  14.     read rep
  15.     if [ "$rep" == "$capitale" ]; then
  16.         echo "Bravo ta trouvé"
  17.     exit
  18.     else
  19.         echo "Perdu"
  20.     fi
  21. done
  22. echo "C'est finit la capitale etais" $capitale
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top