Skip to content

Instantly share code, notes, and snippets.

@utgwkk

utgwkk/countdown.sh

Created Oct 7, 2016
Embed
What would you like to do?
カウントダウンする sleep
#!/bin/sh
countdown () {
sec=$1
while [ $sec -ge 0 ]; do
echo -ne "Waiting for $sec seconds...\033[0K\r"
let "sec = sec - 1"
sleep 1
done
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment