Created
January 10, 2013 18:59
-
-
Save mattstep/4504784 to your computer and use it in GitHub Desktop.
Jury Duty Checker Script
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/bash | |
GROUP_NO=3232 | |
CURRENT_JD_STATUS="$(curl -X POST -d"groupNumber=$GROUP_NO" http://www.sanmateocourt.org/court_divisions/juror_services/jurorstatus.php | grep -A 5 'juryinstructions' | grep msg)" | |
while(true) | |
do | |
PREVIOUS_JD_STATUS=$CURRENT_JD_STATUS | |
CURRENT_JD_STATUS="$(curl -X POST -d"groupNumber=$GROUP_NO" http://www.sanmateocourt.org/court_divisions/juror_services/jurorstatus.php | grep -A 5 'juryinstructions' | grep msg)" | |
echo "Current status at " $(date) " is " $CURRENT_JD_STATUS | |
if [ "$CURRENT_JD_STATUS" != "$PREVIOUS_JD_STATUS" ] | |
then | |
echo "Change detected, emailing change" | |
echo $CURRENT_JD_STATUS | mutt 5551212@txt.att.net | |
fi | |
sleep 60 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment