#!/bin/sh # some think that months with 5 Fridays, 5 Saturdays and 5 Sundays # only happen once in 823 years # SMBates 29 May 2011 # this script is designed to check that, at least for the duration of UNIX epoch # Candidate months must have the 1st on a Friday and have 31 days. YEAR=1970 MONTHS="Jan Mar May Jul Aug Oct Dec" while [ $YEAR -lt 2038 ] do for MONTH in $MONTHS do DATE=`date -d "1 $MONTH $YEAR"` DAY=`echo $DATE | awk '{print $1}'` if [ $DAY = "Fri" ]; then #echo $DATE cal $MONTH $YEAR echo "--------------------------------" fi done YEAR=`expr $YEAR + 1` done
This document was generated using AFT v5.097