Skip to content

Instantly share code, notes, and snippets.

@io12
Created April 18, 2019 03:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save io12/d9455a08c832d412b2b4368636060b30 to your computer and use it in GitHub Desktop.
Save io12/d9455a08c832d412b2b4368636060b30 to your computer and use it in GitHub Desktop.
#!/bin/sh
# Adapted from <https://superuser.com/a/611582>
date1=$(date +%s)
while true; do
s="$(date -u --date @$(($(date +%s) - date1)) +%H:%M:%S)"
printf "%s\r" "$s"
sleep 0.1
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment