Path: utzoo!attcan!uunet!lll-winken!lll-tis!ames!pasteur!agate!ucbvax!hplabs!hplabsz!mayer From: mayer@hplabsz.HPL.HP.COM (Niels Mayer) Newsgroups: comp.mail.mh Subject: Re: can I identify folders with new mail Message-ID: <2546@hplabsz.HPL.HP.COM> Date: 1 Nov 88 01:53:08 GMT References: <348@taeva.UUCP> <2488@hplabsz.HPL.HP.COM> Reply-To: mayer@hplabs.hp.com (Niels Mayer) Organization: Hewlett-Packard Labs, Software Technology Lab, Palo Alto, CA. Lines: 39 Summary: Expires: Sender: Followup-To: Here's a /bin/sh script version of my previous solution, just incase you're interersted: # This is a shell archive. Remove anything before this line, # then unpack it by saving it in a file and typing "sh file". # # Wrapped by Niels P. Mayer on Mon Oct 31 17:41:42 1988 # # This archive contains: # unseen-all # LANG=""; export LANG echo x - unseen-all cat >unseen-all <<'@EOF' #!/bin/sh for i in `/usr/local/bin/mh/folders -fast -recurse` do nummsgs=`/usr/local/bin/mh/mhpath +$i unseen 2>/dev/null | wc -l` if [ $nummsgs != 0 ] then echo Folder +$i has $nummsgs unseen messages. fi done @EOF chmod 755 unseen-all exit 0 ---------- If you know the names of the folders in which messages might be automatically incorporated by mhhook or some other filter program, you can get rid of the overhead of executing `/usr/local/bin/mh/folders -fast -recurse` in the above script with a list of the folder names. -- Niels.