Created
January 16, 2013 16:29
-
-
Save adamhaney/4548589 to your computer and use it in GitHub Desktop.
A bash script to remind you to do pushups during work hours on OS X and Linux
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 | |
# pushup.sh | |
# | |
# Cron entry, weekdays on the hour from 8am-7pm | |
# m h dom mon dow command | |
# 0 8-19 * * 1-5 bash pushup.sh | |
# Minimum number of pushups you want to do | |
MINUPS=10 | |
# Week of the year (1-52) | |
WEEK="`date +%V`" | |
if [[ $(uname) == 'Darwin' ]]; then | |
say "drop and give me `expr $MINUPS + $WEEK % 6`" | |
elif [[ $(uname) == 'Linux' ]]; then | |
echo "drop and give me `expr $MINUPS + $WEEK % 6`" | espeak | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment