Checking .monthtool from a dumb tty

Andy Malis malis at cc5.bbn.com
Sat Dec 3 12:15:35 AEST 1988


This is for monthtool users:

The following short shell script, which I call "today", prints out today's
appointments from your ~/.monthtool file.

You can use it from any dumb tty or tty window, or use it from an "at"
script to send you mail in the morning listing your appointments for the
day.  It understands regular weekly appointments.

Andy

=======cut here=======
#!/bin/csh -f
set a=( `date '+%m %d %y'` )
@ b=$a[1]
@ c=$a[2]
@ d=$a[3]
@ e=`date +%w` + 1
set f="^${b},${c},..${d},|^99,${e},0,"
egrep $f ~/.monthtool | sed -e "s/^[0-9]*,[0-9]*,[0-9]*,//" \
	-e "s/,/ /" -e "s/^ *//" \
	-e "s/^\([0-9][0-9]\)\([0-9][0-9] \)/\1:\2/"
=======that's it=======



More information about the Comp.sys.sun mailing list