rwxrob-dot/scripts/countdown
Rob Muhlestein 2ea0289e9f Rebase
2022-02-09 02:29:05 -05:00

9 lines
193 B
Bash
Executable File

#!/usr/bin/env bash
time="$*"
[[ -z "$time" ]] && echo "usage: $0 TIME (see date -d)" && exit 1
start=$(date "+%s" -d "$time")
now=$(date "+%s")
declare -i secs=$((start-now))
sec2dur "$secs"