Skip to content

Instantly share code, notes, and snippets.

@dingram
Last active December 20, 2015 15:38
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dingram/6155261 to your computer and use it in GitHub Desktop.
Save dingram/6155261 to your computer and use it in GitHub Desktop.
#!/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