countdown - count down a specified time interval
countdown counts down a specified time interval, then beeps and exits. I use it
mainly as an egg timer.
There are a number of different formats for specifying the time
interval. A plain unadorned number is interpreted as seconds.
% countdown 30 # 30 seconds
You can also use a single-letter suffix to indicate units. Available suffices
are s for seconds, m for minutes, h for hours, d for days, and w for weeks.
Note that the number doesn't have to be an integer.
% countdown 30s # 30 seconds
% countdown 0.5m # also 30 seconds
% countdown 12h # twelve hours
% countdown 0.5d # also twelve hours
% countdown 1.5w # one and a half weeks
You can also string together two adjacent time units.
% countdown 1m30s # 90 seconds
% countdown 2h30m # two and a half hours
% countdown 1d1h # twenty-five hours
% countdown 1w3d # ten days
In addition, you can specify a time of day, rather than a duration.
% countdown 4:20am
% countdown 4:20pm
% countdown 4:20
% countdown 4:20:00am
% countdown 4:20:00pm
% countdown 4:20:00
Copyright © 2014,2015 by Jef Poskanzer <jef@mail.acme.com>. All
rights reserved.