Skip to content

Instantly share code, notes, and snippets.

@cbillowes
Created October 17, 2018 17:43
Show Gist options
  • Save cbillowes/bdf2fa386cc41f3863c6d56fcd4527f7 to your computer and use it in GitHub Desktop.
Save cbillowes/bdf2fa386cc41f3863c6d56fcd4527f7 to your computer and use it in GitHub Desktop.
#!/bin/bash
echo "Countdown"
date1=$((`date +%s` + $1));
while [ "$date1" -ge `date +%s` ]; do
echo -ne "$(date -u --date @$(($date1 - `date +%s`)) +%H:%M:%S)\r";
sleep 0.1
done
# chmod +x countdown
# countdown 60
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment