]> diplodocus.org Git - nmh/blob - docs/historical/mh-6.8.5/miscellany/mem/rem.sh
ap: Fix write past end of addrs[] array.
[nmh] / docs / historical / mh-6.8.5 / miscellany / mem / rem.sh
1 #! /bin/sh
2 ctx=/tmp/ctx$$
3 trap "rm -f $ctx" 0 1 2 3 15
4 rm -f $ctx
5 cp ${MHCONTEXT-`mhpath +`context} $ctx
6 MHCONTEXT="$ctx" ; export MHCONTEXT
7 remfolder="+reminders"
8 2>/dev/null folder $remfolder
9 umask 077
10 case $# in
11 0)
12 while when=`promptdate`
13 do
14 remfile=`mhpath $remfolder new`
15 echo "Date: $when
16
17 " > $remfile
18 prompter $remfile
19 done
20 ;;
21 *)
22 when=`promptdate "$*"`
23 remfile=`mhpath $remfolder new`
24 echo "Date: $when
25
26 " > $remfile
27 prompter $remfile
28 ;;
29 esac