Article View: comp.mail.mush
Article #657Re: Convert mh-folders to mush
From: Masato Minda
Date: Sat, 05 Jan 1991 12:15
Date: Sat, 05 Jan 1991 12:15
73 lines
2686 bytes
2686 bytes
In article <1991Jan03.090031.5159@kub.nl>
wessel@kub.nl (Wessel Kraay) writes:
>Does anyone know of a shell script to convert MH-folders to mush folders?
I am using these shell scirpts. But ``From '' line is incorrect.
MinMin
#! /bin/sh
# This is a shell archive. Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file". To overwrite existing
# files, type "sh file -c". You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g.. If this archive is complete, you
# will see the following message at the end:
# "End of shell archive."
# Contents: mhtombox newstombox
# Wrapped by minmin@tamtam on Sat Jan 5 21:05:00 1991
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'mhtombox' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'mhtombox'\"
else
echo shar: Extracting \"'mhtombox'\" \(187 characters\)
sed "s/^X//" >'mhtombox' <<'END_OF_FILE'
X:
for i in $*
do
X egrep From: $i | head -1 | sed s/From:/From/ | awk '{printf "%s", $0}'
X egrep Date: $i | sed -e s/,// | awk '{print " " $2 " " $4 " " $3 " " $6 " " 19 $5}'
X cat $i
done
END_OF_FILE
if test 187 -ne `wc -c <'mhtombox'`; then
echo shar: \"'mhtombox'\" unpacked with wrong size!
fi
chmod +x 'mhtombox'
# end of 'mhtombox'
fi
if test -f 'newstombox' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'newstombox'\"
else
echo shar: Extracting \"'newstombox'\" \(293 characters\)
sed "s/^X//" >'newstombox' <<'END_OF_FILE'
X:
if [ $# = 0 ] || [ ! -f $1 ]
then
X echo "Usage: `basename $0` file ..." 1>&2
X exit 1
fi
X
for i in $*
do
X if test -f $i
X then
X head -20 $i | egrep From: | sed s/From:/From/ | awk '{printf "%s ", $0}'
X date | sed 's/JST //'
X cat $i
X else
X echo "$i: not found." 1>&2
X fi
done
END_OF_FILE
if test 293 -ne `wc -c <'newstombox'`; then
echo shar: \"'newstombox'\" unpacked with wrong size!
fi
chmod +x 'newstombox'
# end of 'newstombox'
fi
echo shar: End of shell archive.
exit 0
--
minmin
Masato Minda ASTEC, Inc. <minmin@astec.co.jp>
Technical Details
Message-ID:
<MINMIN.91Jan5211522@tamtam.astec.co.jp>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!usc!wuarchive!uunet!kddlab!titcca!wnoc-tyo-news!astecgw!minminReferences:
<1991Jan03.090031.5159@kub.nl>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!usc!wuarchive!uunet!kddlab!titcca!wnoc-tyo-news!astecgw!minmin From: minmin@astec.co.jp (Masato Minda) Newsgroups: comp.mail.mush Subject: Re: Convert mh-folders to mush Message-ID: <MINMIN.91Jan5211522@tamtam.astec.co.jp> Date: 5 Jan 91 12:15:22 GMT References: <1991Jan03.090031.5159@kub.nl> Sender: junet@astecgw.astec.co.jp Distribution: comp Organization: ASTEC, Inc. Tokyo, Japan Lines: 73 In-reply-to: wessel@kub.nl's message of 3 Jan 91 09:00:31 GMT