#! /bin/csh -f
# Last edited on 1999-05-05 00:02:41 by stolfi

# Runs compare-mail every 1000 seconds.

alias lm "ls -AblL /var/spool/mail/ | gawk '/^-/{print "'$5,$9'";}'"

set prev = "000"
lm > ~/temp/$$.${prev}

while ( ${prev} < 099 )
  sleep 100
  @ this  = ${prev} + 1 
  set this = `printf '%03d' ${this}`
  lm > ~/temp/$$.${this}
  cat ~/temp/$$.${prev} ~/temp/$$.${this} | compare-mail > ~/temp/$$-d.${this}
  set prev = "${this}"
end
