Created
August 13, 2017 03:45
-
-
Save vitalibertas/732c0b2a251f480c287ca6418ab1be65 to your computer and use it in GitHub Desktop.
Bash script being polite during work hours. Does hour math to sleep until 5:00 pm.
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
if [ $(date +"%-H") -ge 4 ] && [ $(date +"%-H") -le 17 ]; then | |
sleep $(((17 - $(date +"%-H")) * 60))m | |
else | |
sleep 5m | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment