Advertisement
Guest User

Untitled

a guest
Sep 21st, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. if test "$1" = ""
  4. then
  5. echo "Utilisation : $0 nb_minutes"
  6. exit 1
  7. fi
  8.  
  9. echo "Attente durant "$1 "min : go !"
  10.  
  11. nb_secondes=`expr $1 \* 60`
  12.  
  13. for I in `seq $nb_secondes`
  14. do
  15. total_secs_restantes=`expr $nb_secondes - $I`
  16. nb_minutes_restantes=`expr $total_secs_restantes / 60`
  17. nb_secondes_restantes=`expr $total_secs_restantes - $nb_minutes_restantes \* 60`
  18.  
  19. echo -n "\r"
  20. echo -n "Il reste " $nb_minutes_restantes "min " $nb_secondes_restantes "s "
  21.  
  22. if test $total_secs_restantes -eq 0
  23. then
  24. echo "\nFINI !"
  25. play /home/funto/musique/autres/c_est_pret.wav 2> /dev/null
  26. zenity --info --text="C'est prêt !"
  27. exit 0
  28. fi
  29.  
  30. sleep 1
  31. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement