Skip to content

Instantly share code, notes, and snippets.

@boillodmanuel
Created November 8, 2019 10:14
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save boillodmanuel/676b3af823fae4177f1d0b41a6f23442 to your computer and use it in GitHub Desktop.
Save boillodmanuel/676b3af823fae4177f1d0b41a6f23442 to your computer and use it in GitHub Desktop.
sleep-with-countdown() {
secs=$1
while [ $secs -gt 0 ]; do
printf "\rsleep: $secs\033[0K"
sleep 1
: $((secs--))
done
printf "\n"
}
@zqxyz
Copy link

zqxyz commented Oct 22, 2021

Very helpful

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment