Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!sdd.hp.com!hplabs!hpda!hpcuhb!hpscdc!schmitz From: schmitz@hpscdc.scd.hp.com (John Schmitz) Newsgroups: comp.mail.mh Subject: Re: FAQ and convertion from unix-mail to mh Message-ID: <5740008@hpscdc.scd.hp.com> Date: 16 Nov 90 16:32:17 GMT References: Organization: Hewlett-Packard, Santa Clara Div. Lines: 33 Here's a short script that usually does the MH->unix mail conversion quite well (I didn't write this - might have been rsalz?): #! /bin/sh ## MHtoMT. MH to UnixMail conversion. Example: ## MHtoUM personal ## Reads all messages in MH directory ./personal, and creates the ## Unix Mail folder ~/F/personal. ## Assumes everything else has been cleaned out but MH folders. X="`date | sed -e 's/^... //'`" F=$HOME/F cd $HOME/Mail for D in ${1-*} ; do if [ ! -d ${D} ] ; then echo Skipping ${D} -- not a directory continue fi cd ${D} for I in `ls | grep -v '[^0-9]' | sort -n` ; do T=`grep '^Date:' <${I} | head -1` Z=`echo $T | sed -e 's/Date:[^,]*, //' -e 's/Date: //'` # echo $I Date is @"$Z"@ >&2 if [ -z "${Z}" ] ; then Z="${X}" fi echo "" grep -v '^Replied:' <$I | \ sed -e "/Return-Path:/s=\$= ${Z}=" -e "/Return-Path:/s//From /" done >${F}/${D} cd .. done