home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!usc!rpi!crdgw1!rdsunx.crd.ge.com!rdsunx!montnaro
- From: montnaro@spyder.crd.ge.com (Skip Montanaro)
- Newsgroups: gnu.emacs.help
- Subject: Re: Converting RMAIL files to Unix mbox format
- Message-ID: <MONTNARO.92Aug13104258@spyder.crd.ge.com>
- Date: 13 Aug 92 15:42:58 GMT
- References: <KATZ.92Aug11164350@carbon.elements.rpal.rockwell.com>
- Sender: usenet@crd.ge.com (Required for NNTP)
- Reply-To: montanaro@crd.ge.com (Skip Montanaro)
- Organization: GE Corporate Research & Development, Schenectady, NY
- Lines: 43
- In-Reply-To: katz@elements.rpal.rockwell.com's message of 11 Aug 92 21:43:50 GMT
- Nntp-Posting-Host: spyder.crd.ge.com
-
-
- In article <KATZ.92Aug11164350@carbon.elements.rpal.rockwell.com> katz@elements.rpal.rockwell.com (Morry Katz) writes:
-
- Does anybody have a program for converting RMAIL files to Unix mbox
- format?
-
- Time to post Nathan Hess's little shell script once again...
-
- #!/bin/sh
- #
- # usage: rmail-to-mail file1 file2 ...
- #
- # result: file1~ is the original Babyl file
- # file1 is an empty Babyl file
- # file1.mail is a UNIX mail file with the messages from file1
-
- cat > /tmp/$$.el << EOF
- ;;;
- ;;; Author: Nathan Hess (woodstock@hobbes.intel.com)
- ;;;
- ;;
-
- (let ((file-to-be-converted (buffer-file-name))
- (message-count 0)
- (rmail-delete-after-output t)
- (unix-style-file-name (concat (buffer-file-name) ".mail")))
- (kill-buffer (current-buffer))
- (rmail file-to-be-converted)
- (rmail-show-message 1)
- (while (not (rmail-output unix-style-file-name))
- (setq message-count (1+ message-count)))
- (rmail-quit))
- EOF
-
- for f in "$@" ; do
- echo ">>> Doing $f"
- emacs -batch $f -l /tmp/$$.el -kill
- echo ">>> Done"
- done
-
- rm -f /tmp/$$.el
- --
- Skip (montanaro@crd.ge.com)
-