| #!/usr/local/plan9/bin/rc |
| 9p read $srv >[2=1]|grep -v '^9p\:' |
| 9p ls $srv >[2=1]|grep -v '^9p\:' |
| TMP=/tmp/$USER.`{date -n}; sleep 1 |
| read9p $msg/body >$TMP.body |
| ,x/<!--(-?[^\-]|--[^>]|\n)*-->/ c// |
| '| sam -d $TMP.body|[2] sed '1d;/^\?/d' |
| if (~ `{read9p $msg/1/type} text/plain) |
| if not if (~ `{read9p $msg/2/type} text/plain) |
| for (i in `{dir9p $msg|awk '$10 ~ /[0-9][0-9]*/ {print $10}'}) |
| echo usage: msgcat mail/mbox/msgn && exit 1 |
| if (~ `{read9p $mesg/lines} '') |
| echo no such message $mesg && exit 2 |
| read9p $mesg/unixheader; read9p $mesg/header |