Skip to content

Instantly share code, notes, and snippets.

@kenshin579
Created February 26, 2019 04:48
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 kenshin579/1b8dc3d9db35b6fee534569ec128e62b to your computer and use it in GitHub Desktop.
Save kenshin579/1b8dc3d9db35b6fee534569ec128e62b to your computer and use it in GitHub Desktop.
countdown script
function countdown {
MIN=$1 && for i in $(seq $(($MIN*60)) -1 1); do
printf "\r%02d:%02d:%02d" $((i/3600)) $(( (i/60)%60)) $((i%60)); sleep 1;
done
osascript -e 'display notification "시간이 지났습니다" with title "Countdown" sound name "Clock-chimes"';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment