#!/bin/sh # xlmdcheck - xlbiff script to check maildirs # with mblaze: HASH=$(mdirs ~/Mail ~/work/Mail | grep -v -e "Sent Mail" -e "hott" | mlist -s | cksum | cut -b1-9) echo $HASH if [ "$2" -ne $HASH ]; then if [ "$HASH" -eq 429496729 ]; then # empty output exit 2 else exit 0 fi fi exit 1 # old, with MH: HASH=$(ls ~/Mail/*/*/*2, 2>/dev/null | grep -v -e "Sent Mail" -e hott -e /tmp/ | cksum | cut -b1-9) echo $HASH if [ "$2" -ne $HASH ]; then if [ "$HASH" -eq 429496729 ]; then # empty output exit 2 else exit 0 fi fi exit 1