#!/bin/sh # # remind -- create an email message script that uses at for scheduling msg_queue=$HOME/.remind/queue [ -d $msg_queue ] || mkdir -p $msg_queue # Make the tempfile TMPFILE=`tempfile -d $msg_queue --prefix="msg-"` # Edit the recipients as you deem appropriate cat << EOHDR >> $TMPFILE cat << EOMSG |sed -e '/^#.*$/ d'|sendmail -oi -t # DO NOT TOUCH THE LINE ABOVE # # This is a shell script that will run at the time you specified on the command # line. When at(1) runs the command, the message that follows will be sent to # the recipients you've specified. Edit the mesage below appropriately. The # X-at-... headers contain info about this script file and the commands passed # to at(1). # # Any line starting with a "#" will be deleted before the message is sent. # From: chewie+remind@wookimus.net To: 9522006794@voicestream.net Cc: chad@cbs.umn.edu, chewie@wookimus.net #X-at-args: $@ #X-at-script: $TMPFILE Subject: [Reminder] When: Where: # Add notes or message above EOHDR # allow user to edit reminder $EDITOR $TMPFILE # concatenate end of "EOMSG" cat << EOFOOT >> $TMPFILE EOMSG rm $TMPFILE || true EOFOOT # Submit job to at at -f $TMPFILE $@