#!/bin/sh #MCount - Gives a quick listing of new and old mail. #MCount v1.1.2 - (effectively) uses .mmsrc file #MCount v1.1.1 - boldosity. #MCount v1.1 #Previous Incarnation: mailcnt v4.0 #by Mark Miller #Retrieve some variables: . $HOME/.buffyrc; echo "" for FOLDER in $FOLDER_LIST; do total=`$GREP -c "$STATUS" $MAILDIR/$FOLDER` new=`$GREP -c "$STATUS_NEW" $MAILDIR/$FOLDER` if [ $new -ne 0 ]; then printf "$B%21s$UB%2d%-7s%2d%7s\n" "$FOLDER Message(s): " $new " New / " $total "Total." else printf "%21s%2d%-7s%2d%7s\n" "$FOLDER Message(s): " $new " New / " $total " Total." fi done totalInbox=`$GREP -c "$STATUS" $MAIL` newInbox=`$GREP -c "$STATUS_NEW" $MAIL` printf "\n\t%-50s\n" " You have $newInbox new personal message(s)." printf "\t%-50s\n\n" " You have $totalInbox total personal messages." if [ $newInbox -ne 0 ]; then frm -s new -s unread fi