Blog IndexPosts by TagHome

Remembering Birthdays

Posted <2017-02-19 Sun 18:10> by Aaron S. Jackson.

Remembering birthdays without Facebook is a bit tricky and was recently reminded of this over the past couple of weeks. I store my contacts in an org file (Emacs org-mode) on my home server, so I wrote a short script which runs at 1AM each day from Cron:

#!/usr/local/bin/bash

d=$(date +%d/%m)
people=$(grep $d Contacts.org)

if [ -n "$people" ]; then
    echo "$people" | \
        awk -F'|' '{ print $2 }' | \
        mail -s "birthdays" someone@blah.bluh
fi

Related posts:

Tags: hacks

Blog IndexPosts by TagHome

Copyright 2007-2017 Aaron S. Jackson (modified: Sun 23 Jul 14:30:46 BST 2017)