home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.mail.mh:978 comp.mail.elm:2014
- Path: sparky!uunet!mcsun!Germany.EU.net!unido!sapwdf!wohler
- From: wohler@sapwdf.UUCP (Bill Wohler)
- Newsgroups: comp.mail.mh,comp.mail.elm
- Subject: Re: Urgent request
- Keywords: convert, inc, spool, elm, mh
- Message-ID: <3743@sapwdf.UUCP>
- Date: 28 Jul 92 09:47:37 GMT
- References: <4#qxgx#@rpi.edu> <nhu3u04@fido.asd.sgi.com>
- Reply-To: Bill Wohler <wohler@sap-ag.de>
- Organization: SAP AG, Walldorf, Germany
- Lines: 78
-
- shankar@sgi.com (Shankar Unni) writes:
- >In article <4#qxgx#@rpi.edu> lingy@rpi.edu writes:
- >>8( Can any kind soul please help me get it back into the old format as
- >>I do not like to use mh (not that it's bad, but I just don't have the time
- >>to learn it and I am quit happy with Elm until I learn mh and get a nice
- >>Elm-like front-end for it)
-
- >I have a script for this, which I am posting, since others may find it
- >useful as well:
-
- to save yourself time in the future and to reduce newsgroup traffic,
- don't bother with a followup when the answer is in the faq: i
- *always* send a reply to people who post faq's. in this case, the
- faq solution is also *much* shorter and doesn't require ksh or a
- special awk (see below). in other cases, i heartily enjoy receiving
- e-mail with new information and critiques about the FAQ.
-
-
- if you cannot find the FAQ on your system, you can obtain it
- yourself. the FAQ can be ftped:
-
- pit-manager.mit.edu [18.72.1.58] /pub/usenet/news.answers/mh-faq
- /pub/usenet/news.answers/nn-faq
-
- if you don't have FTP access, you can request a copy of the FAQ by
- sending mail to mail-server@pit-manager.mit.edu containing one (or
- both) of the following:
-
- send usenet/news.answers/mh-faq
- send usenet/news.answers/nn-faq
-
-
- Subject: Can I append MH messages (ie. +inbox/1) to a UNIX mailbox format file?
- From: Using MH-24
-
- #! /bin/sh
- # packmbox - pack an MH folder back into a UUCP-style mbox
- #
- # Defaults:
- # `+folder' defaults to current folder
- # `msgs' defaults to all
- #
- # Context:
- # Current-Folder
- #
- # for simplicity (and speed) we don't parse command-line args (much)
- case $#/$1 in
- 1/-h*) echo "syntax: packmbox [+folder] [msgs] [-help]" 1>&2; exit 0;;
- esac
-
- format="%(msg) From \
- %<{return-path}%(putstr)%|\
- %<(nonnull(mbox{from}))%(putstr)%|nobody%>@\
- %<(nonnull(host{from}))%(putstr)%|nowhere%>%> \
- %(day{date}) %(month{date}) %2(mday{date}) \
- %02(hour{date}):%02(min{date}):%02(sec{date}) \
- %(void(year{date}))%<(gt 100)%4(putnum)%|19%02(putnum)%>"
-
- trap 'rm -f /tmp/packm$$; exit 1' 1 2 3 15
-
- scan -noclear -noheader -noreverse -width 256 \
- -format "${format}" $* >/tmp/packm$$
- # tricky -- you must do this "cd" after scan has updated the context
- cd `mhpath`
-
- exec </tmp/packm$$
- rm -f /tmp/packm$$
- while read m f
- do
- echo "$f"
- sed -e '/^From /s/^/>/' < $m
- echo ""
- done
- exit
-
-
- Bill Wohler <wohler@sap-ag.de> <sapwdf!wohler>
- Heidelberg Red Barons Ultimate Frisbee Team
-