From a35a7d00b557624b9c15f3cd3fd3f2e751f928ed Mon Sep 17 00:00:00 2001 From: David Phillips Date: Fri, 14 Jul 2017 22:39:30 +1200 Subject: Add UNIX epoch countdown script --- local/bin/countdown.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 local/bin/countdown.sh diff --git a/local/bin/countdown.sh b/local/bin/countdown.sh new file mode 100755 index 0000000..fc2fc7f --- /dev/null +++ b/local/bin/countdown.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +target=1600000000 +delta=1 + +while [ $delta != 0 ] ; do + unix=$(date +%s) + delta=$(( $target - $unix )) + echo $(date --date="@$unix") : $unix : $delta + sleep 1 +done -- cgit v1.1