Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- if test "$1" = ""
- then
- echo "Utilisation : $0 nb_minutes"
- exit 1
- fi
- echo "Attente durant "$1 "min : go !"
- nb_secondes=`expr $1 \* 60`
- for I in `seq $nb_secondes`
- do
- total_secs_restantes=`expr $nb_secondes - $I`
- nb_minutes_restantes=`expr $total_secs_restantes / 60`
- nb_secondes_restantes=`expr $total_secs_restantes - $nb_minutes_restantes \* 60`
- echo -n "\r"
- echo -n "Il reste " $nb_minutes_restantes "min " $nb_secondes_restantes "s "
- if test $total_secs_restantes -eq 0
- then
- echo "\nFINI !"
- play /home/funto/musique/autres/c_est_pret.wav 2> /dev/null
- zenity --info --text="C'est prêt !"
- exit 0
- fi
- sleep 1
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement