Created
October 20, 2017 16:38
-
-
Save frigginglorious/4772bcc3d685ca9e7b798d1d35ca5b3c to your computer and use it in GitHub Desktop.
timer script. Accepts one argument, time in seconds before alarm goes off.
This file contains hidden or 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/bash | |
seconds=$1; date1=$((`date +%s` + $seconds)); | |
while [ "$date1" -ge `date +%s` ]; do | |
echo -ne "$(date -u --date @$(($date1 - `date +%s` )) +%H:%M:%S)\r"; | |
done | |
aplay /usr/share/sounds/alsa/Front_Center.wav |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment