Created
June 27, 2012 23:48
-
-
Save luiz/3007672 to your computer and use it in GitHub Desktop.
Countdown for bash
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# depends: figlet beep | |
# usage: countdown.sh <seconds> | |
COLUMNS=$(tput cols) | |
for i in `seq $1 -1 1` | |
do | |
clear | |
figlet -w $COLUMNS -c $i | |
sleep 1 | |
done | |
clear | |
beep | |
figlet -w $COLUMNS -c "EOT" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment