home *** CD-ROM | disk | FTP | other *** search
- #!/usr/local/bin/perl
- # -*-Perl-*-
- ###############################################################################
- #
- # File: mbox2bsd
- # RCS: /usr/local/sources/CVS/mailapp-utilities/mbox2bsd,v 1.1.1.1 1996/11/24 14:56:16 tom Exp
- # Description: A quick hack to convert mailboxes to BSD format (handles NeXTmail)
- # Author: Carl Edman
- # Created: Sun Mar 31 14:34:54 1996
- # Modified: Sun Mar 31 14:35:21 1996 (Carl Edman) cedman@capitalist.princeton.edu
- # Language: Perl
- # Package: N/A
- # Status: Experimental (Do Not Distribute)
- #
- # (C) Copyright 1996, but otherwise this file is perfect freeware.
- #
- ###############################################################################
-
- $ascii="";
-
- while(<>) {
- print $_;
- if (/^Next-Reference: +([^ ]*),/o) {
- $path=substr($ARGV,$[,rindex($ARGV,'/')+1);
- $ascii=`rtf-ascii $path/$1/index.rtf`;
- chop $ascii;
- }
- if (/^$/o && ($ascii ne "")) { print $ascii; print "\n"; $ascii=""; }
- }
-