Added countdown timer

This commit is contained in:
Brad Ganley 2023-02-13 02:29:06 -06:00
parent 74f1200c25
commit 829579ca90

View File

@ -86,3 +86,13 @@ alias tootctl='docker exec -it -w /app/www mastodon bin/tootctl'
alias hackingtool='docker run -it --net=host --privileged vgpastor/hackingtool'
# Do you need to reboot? Find out here!
alias needrs='[ -f /var/run/reboot-required ] && echo "You need to reboot"'
# Countdown Timer
countdown() {
start="$(( $(date '+%s') + $1))"
while [ $start -ge $(date +%s) ]; do
time="$(( $start - $(date +%s) ))"
printf '%s\r' "$(date -u -d "@$time" +%H:%M:%S)"
sleep 0.1
done
}