1 #!/usr/local/plan9/bin/rc
5 9p read $srv >[2=1]|grep -v '^9p\:'
10 9p ls $srv >[2=1]|grep -v '^9p\:'
15 # hold on for a second
16 TMP=/tmp/$USER.`{date -n}; sleep 1
18 read9p $msg/body >$TMP.body
23 ,x/<!--(-?[^\-]|--[^>]|\n)*-->/ c//
29 '| sam -d $TMP.body|[2] sed '1d;/^\?/d'
34 case multipart/related
35 if (~ `{read9p $msg/1/type} text/plain)
37 if not if (~ `{read9p $msg/2/type} text/plain)
40 for (i in `{dir9p $msg|awk '$10 ~ /[0-9][0-9]*/ {print $10}'})
45 # should there be more?
51 echo usage: msgcat mail/mbox/msgn && exit 1
54 if (~ `{read9p $mesg/lines} '')
55 echo no such message $mesg && exit 2
58 read9p $mesg/unixheader; read9p $mesg/header