#!/bin/sh

#YEARS="1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008"
YEARS="1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008"

for y in $YEARS
do
  /bin/rm -r -f /disk/hq53_dop01/others/typhoon_mesg/tmp/mesgs/$y
  /bin/mkdir /disk/hq53_dop01/others/typhoon_mesg/tmp/mesgs/$y || exit 1
  cd /disk/hq53_dop01/others/typhoon_mesg/tmp/mesgs/$y || exit 1
  pwd
  /disk/hq53_dop01/others/typhoon_mesg/tmp/split-mail.py /disk/hq53_dop01/others/typhoon_mesg/tmp/fixed/$y
  if [ $? -ne 0 ]; then
    exit 1
  fi
done
