Last active
December 20, 2015 15:38
-
-
Save dingram/6155261 to your computer and use it in GitHub Desktop.
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 | |
# | |
# By Dave Ingram | |
export TZ="Europe/London" | |
case $( date +%I ) in | |
01) DOCTOR='William Hartnell' ;; | |
02) DOCTOR='Patrick Troughton' ;; | |
03) DOCTOR='Jon Pertwee' ;; | |
04) DOCTOR='Tom Baker' ;; | |
05) DOCTOR='Peter Davison' ;; | |
06) DOCTOR='Colin Baker' ;; | |
07) DOCTOR='Sylvester McCoy' ;; | |
08) DOCTOR='Paul McGann' ;; | |
09) DOCTOR='Christopher Eccleston' ;; | |
10) DOCTOR='David Tennant' ;; | |
11) DOCTOR='Matt Smith' ;; | |
12) DOCTOR='Peter Capaldi' ;; | |
esac | |
MINUTES=$(date +%M) | |
if [[ "${MINUTES}" == "00" ]]; then | |
echo "It is currently ${DOCTOR}" | |
elif [[ "${MINUTES}" == "01" ]]; then | |
echo "It is currently 1 minute past ${DOCTOR}" | |
else | |
echo "It is currently ${MINUTES#0} minutes past ${DOCTOR}" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment