Created
October 7, 2016 07:49
-
-
Save utgwkk/8c8200ffe04fc500676b9549cc163aaf to your computer and use it in GitHub Desktop.
カウントダウンする sleep
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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