#!/bin/bash #set -x #Set the counter to numbers COUNTER=$1 if [ "$(expr $COUNTER + 0 2> /dev/null)" != "$COUNTER" ] then COUNTER=50 fi #Clean up the old stuff tput sc WIDTH=`tput cols` CLEAR () { tput rc for I in {1..6} do tput el echo done tput rc } #The actual count down while [ "$COUNTER" -ge "0" ] do COUNT=`printf %02d $COUNTER` CLEAR figlet " $COUNT" sleep 0.5 let "COUNTER -= 1" done CLEAR figlet " Clear ! "