Path: utzoo!utgpu!watmath!clyde!att!rutgers!mailrus!cornell!uw-beaver!rice!sun-spots-request From: malis@cc5.bbn.com (Andy Malis) Newsgroups: comp.sys.sun Subject: Checking .monthtool from a dumb tty Message-ID: <8811221402.AA28940@rice.edu> Date: 3 Dec 88 02:15:35 GMT Sender: usenet@rice.edu Organization: Rice University, Houston, Texas Lines: 23 Approved: Sun-Spots@rice.edu Original-Date: Tue, 22 Nov 88 08:59:19 -0500 X-Sun-Spots-Digest: Volume 7, Issue 34, message 10 of 12 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=======