diff options
author | David Phillips <david@sighup.nz> | 2017-07-14 22:39:30 +1200 |
---|---|---|
committer | David Phillips <david@sighup.nz> | 2017-07-14 22:39:30 +1200 |
commit | a35a7d00b557624b9c15f3cd3fd3f2e751f928ed (patch) | |
tree | 8eaa0dc71b2670378c85d6d14ca206bcbfeff4c3 | |
parent | 4c41d64d0bafe211b257b6b0a2021297d4b296ea (diff) | |
download | dotfiles-a35a7d00b557624b9c15f3cd3fd3f2e751f928ed.tar.xz |
Add UNIX epoch countdown script
-rwxr-xr-x | local/bin/countdown.sh | 11 |
1 files changed, 11 insertions, 0 deletions
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 |