Last active
March 15, 2018 21:55
-
-
Save andresaquino/5dd08af1646a25a79a465a019971d982 to your computer and use it in GitHub Desktop.
Un sencillo timer en bash
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 | |
# vim: ts=3 sw=3 sts=3 et si ai: | |
# (c) 2018, Andres Aquino <inbox@andresaquino.sh> | |
# This file is licensed under the BSD License version 3 or later. | |
# See the LICENSE file. | |
trap "exit 0" SIGINT SIGTERM | |
ccount=0 | |
while(true); do | |
etime=$(date '+%H%Mµ%S') | |
toilet -f smmono9 "${etime}: time's up." | |
utimer -t ${1} | |
ccount=$((${ccount}+1)) | |
if [ ${ccount} -eq 4 ]; then | |
clear | |
ccount=0 | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment