#!/bin/bash CRAN=/data/WWW/ftp/pub/R for list in announce devel help; do for year in 1997 1998 1999 2000; do dir="r-$list/$year" mkdir -p $dir for f in $CRAN/doc/mail-archives/$dir/*; do hypermail -u -m $f -d $dir -l "R $list $year" done done done