Friday the 13th

Being a curious person, like the ones around here, you’re probably wondering what other years between now and, say, 2034, in which a Friday the 13th will occur in October. Well, wonder no more. Jump on the nearest ‘nix box (or Mac) and run:

> for i in 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34; do cal 10 20$i | awk ‘{print $6}’ | grep 13 > /dev/null; if [ $? -eq 0 ]; then echo “20$i”; fi; done

What? No Linux boxen handy? Well, here’s what you’ll get:

2006
2017
2023
2034

So now you know. Was there an easier way to do that?

Comments are closed.