Epoch time 1234567890 Count-Down timer.

in epoch countdown count-up shell script while loop sleep

Wrote a little one-liner for the countdown (or count-up rather) to Epoch time being 1234567890
It shows Current count, seconds left, and the target.

while sleep 1; do NOW=`date +%s`; let CD=1234567890-$NOW; let HOUR=$CD/60/60; let MIN=$CD/60%60; let SEC=$CD%60; printf "$NOW $HOUR:$MIN:$SEC ($CD seconds) until 1234567890 \r"; done

Enjoy it, while it lasts!... :-)
And remember, anyone claiming to be born before 1970 is lying!

forum