Changed parse() to parse Reply-To as AddressListField
[mime4j.git] / bin / split-mbox.sh
blobabb312e155e3f9fc9e8988f501dbbbed5a5fe116
1 #!/bin/bash
3 BASE_DIR=`dirname $0`/..
5 if [ -z $1 ]; then
6 "Please specify an mbox file to split"
7 exit
8 fi
10 sed -e 's/^$/\x0D/' -e 's/\([^\x0D]\)$/\1\x0D/g' "$1" | $BASE_DIR/bin/split-mbox.pl
12 for i in message.*; do
13 echo "Renaming $i"
14 sed -e '/^From /d' $i > $i.tmp
15 rm -f $i
16 mv $i.tmp `md5sum $i.tmp | awk '{print $1}'`.msg
17 done