MIN=10;for ((i=MIN*60;i>=0;i–));do echo -ne “\r$(date -d”0+$i sec” +%H:%M:%S)”;sleep 1;done
2011-02-20 11:56:28
User: flatcap
Functions: echo sleep
11
Countdown Clock

Countdown clock – Counts down from $MIN minutes to zero.

I let the date command do the maths.

This version doesn’t use seq.

Advertisements