#!/bin/sh
#< Simple highlighted calendar script - highlights the current day
# Requires "hgrep"
# KW 08/12/04
_MONTH=`date +%m`
_DAY=`date +%d`
_YEAR=`date +%Y`
_FIXED_DAY=`echo $_DAY | sed 's/[0]\([0-9]\)/\1/'`
cal $_MONTH $_YEAR > $HOME/tmp/calfile
oldIFS=$IFS
IFS=
while read line
do
echo "$line" | grep "[ ]${_FIXED_DAY}[ ]" > /dev/null 2>&1
if [ "$?" -eq "0" ]; then
echo "$line" | hgrep "$_FIXED_DAY"
else
echo "$line"
fi
done < $HOME/tmp/calfile
IFS=$oldIFS
exit 0