6 |
fi |
fi |
7 |
|
|
8 |
url=$1 |
url=$1 |
9 |
|
name=`echo $url | sed -e 's!^.*/pipermail/!!' -e 's!/!!g'` |
10 |
|
|
11 |
|
if [ -e $name ] ; then |
12 |
|
echo "$name allready exists!" |
13 |
|
exit 1 |
14 |
|
fi |
15 |
|
|
16 |
wget="-N -nd -nH" |
wget="-N -nd -nH" |
17 |
|
|
18 |
wget $wget $url |
mkdir /tmp/$name || exit |
19 |
|
cd /tmp/$name |
20 |
|
|
21 |
echo -n > mbox |
wget -O index.html $wget $url |
22 |
|
|
23 |
grep txt.gz index.html | cut -d\" -f2 | while read file ; do |
echo -n > $name |
24 |
|
|
25 |
|
grep \.txt index.html | cut -d\" -f2 | while read file ; do |
26 |
echo "downloading $url/$file" |
echo "downloading $url/$file" |
27 |
wget $wget "$url/$file" |
wget $wget "$url/$file" |
28 |
zcat $file | perl -pe 's/^(From.+?) at (.+)$/$1\@$2/g' >> mbox |
if echo $file | grep '\.gz$' >/dev/null ; then |
29 |
|
cat=zcat |
30 |
|
else |
31 |
|
cat=cat |
32 |
|
fi |
33 |
|
$cat $file | perl -pe 's/^(From.+?) at (.+)$/$1\@$2/g' >> $name |
34 |
done |
done |
35 |
|
|
36 |
|
echo "Files left in /tmp/$name/$name" |