Mercurial > hg > xemacs-beta
comparison lisp/vm/mh-to-vm.sh @ 0:376386a54a3c r19-14
Import from CVS: tag r19-14
author | cvs |
---|---|
date | Mon, 13 Aug 2007 08:45:50 +0200 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:376386a54a3c |
---|---|
1 #!/bin/sh | |
2 | |
3 # Date: Thu, 9 Dec 93 18:23:56 -0500 | |
4 # From: kyle@crystal.WonderWorks.com (Kyle Jones) | |
5 # To: lipp@networx.com | |
6 # Cc: info-vm@uunet.uu.net | |
7 # Subject: Converting MH folders to VM | |
8 # | |
9 # Damon Lipparelli writes: | |
10 # > Does anyone have a way of converting MH folders to VM folders? I've just | |
11 # > switched to using VM and I don't want to have to re-mail myself all of my | |
12 # > old mail messages stored with MH to get them into VM folders. | |
13 # | |
14 # If I remember correctly MH folders are just directories, with one | |
15 # message per file. No UNIX From lines control-As or any of that | |
16 # cruft. So you need to roll these messages into one file that VM | |
17 # can handle. To get UNIX From style folders this script ought to | |
18 # do it. Run it like this | |
19 # | |
20 # % mh-to-vm.sh MH-folder-directory new-VM-folder-file | |
21 # | |
22 # It doesn't remove anything so if it doesn't work, then no harm done. | |
23 | |
24 source=$1 | |
25 dest=$2 | |
26 | |
27 leader="From nobody `date`" | |
28 trailer="" | |
29 | |
30 for message in $source/* | |
31 do | |
32 echo $leader >> $dest | |
33 sed 's/^From />From /' < $message >> $dest | |
34 echo $trailer >> $dest | |
35 done | |
36 | |
37 exit |