Added all of the MH sources, including RCS files, in
[mmh] / docs / historical / mh-6.8.5 / miscellany / mem / mem.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 printformat="%4(msg) %3(day{date}) %03(month{date}) %02(mon{mday})  %02(hour{date}):%02(min{date})%(void(hour{date}))%<(gt 11)pm%|am%>%<{date} %|*%>%{subject}%{body}"
9 case $# in
10     0)
11         while when=`promptdate`
12         do
13                 2>/dev/null scan `2>/dev/null pick $remfolder -after yesterday -and -before "$when"` -format "$printformat" $list
14         done
15         ;;
16     *)
17         when=`promptdate "$*"`
18         2>/dev/null scan `2>/dev/null pick $remfolder -after yesterday -and -before "$when"` -format "$printformat" $list
19         ;;
20 esac